Menu

#2419 returning ptr to __xdata: Definition mismatches with declaration

closed-fixed
Ben Shi
None
Front-end
5
2016-02-02
2015-09-19
No

The followin code compiles ok for mcs51 in rev. 9321:

inline void *aligned_alloc (void)
{
}

extern void *aligned_alloc(void);

but this one does not:

inline void __xdata *aligned_alloc (void)
{
}

extern void __xdata *aligned_alloc(void);

I don't see why one should compile, but not the other.

Philipp

Discussion

  • Philipp Klaus Krause

    What the fuck is wrong with this markdown shit again? I put five tildes around each example code section in my bugreport, but the code is still messed up.

    Philipp

     

    Last edit: Philipp Klaus Krause 2015-09-19
    • Maarten Brock

      Maarten Brock - 2015-09-19

      I've changed your post with a few extra newlines to make markdown happy. I agree that it sucks that you need to have an empty line before and after the lines with the tildes.

      This does not work:

      Some text
      ~ ~ ~ ~
      some code, but still not showing as such
      ~ ~ ~ ~
      More text
      

      But this does

      Some text
      
      ~ ~ ~ ~
      some code, showing as such thanks to the empty lines
      ~ ~ ~ ~
      
      More text
      

      It's also awkward that I cannot type four tildes inside the preformatted text even when I use a different means to indicate preformatting (4 leading spaces).

      Maarten

       
  • Philipp Klaus Krause

    A test file to reproduce the issue is attached.

    Philipp

     
  • Maarten Brock

    Maarten Brock - 2015-09-19
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,4 +1,5 @@
     The followin code compiles ok for mcs51 in rev. 9321:
    +
     ~~~~~
     inline void *aligned_alloc (void)
     {
    @@ -8,6 +9,7 @@
     ~~~~~
    
     but this one does not:
    +
     ~~~~~
     inline void __xdata *aligned_alloc (void)
     {
    
     
  • Ben Shi

    Ben Shi - 2016-01-15
    • Category: other --> Front-end
     
  • Ben Shi

    Ben Shi - 2016-02-02
    • status: open --> closed-fixed
    • assigned_to: Ben Shi
     
  • Ben Shi

    Ben Shi - 2016-02-02

    Fixed in reversion #9491.

     

Log in to post a comment.