#2271 Wrong linkage of symbol declarators?

closed-fixed
Ben Shi
None
Front-end
5
2015-12-24
2014-04-25
CG R
No

Hello, I was going through the source code and I encountered something that seems to be a problem.

Let's say I declare something like this:
int func(int (*[])(int parm));
This should be declared as: Array (any elems) of pointer to a function returning int

Per rule 'abstract_declarator -> pointer abstract_declarator2' in 'SDCC.y', the linkage happens like: pointer->next = abstract_declarator2 ($1->next = $2) resulting in 'pointer to array' and not 'array of pointer'.

I am using SDCC 3.4.0-rc2 source.

Thank you.

Discussion

  • CG R

    CG R - 2014-04-26

    Just a correction, I meant the function parameter only: 'int (*[])(int parm)'. Thank you.

     
  • Ben Shi

    Ben Shi - 2015-07-21
    • Category: other --> Front-end
     
  • Ben Shi

    Ben Shi - 2015-12-24
    • status: open --> closed-fixed
    • assigned_to: Ben Shi
     
  • Ben Shi

    Ben Shi - 2015-12-24

    Fixed in reversion #9428.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks