ltcmelo / psychec

A compiler frontend for the C programming language
BSD 3-Clause "New" or "Revised" License
538 stars 39 forks source link

Declarator may not be initialized (function pointers) #21

Closed xavierpinho closed 3 years ago

xavierpinho commented 3 years ago

ISO C Standard -std=c11

Version

Screenshot 2021-02-23 at 18 25 54

The snippet

int f(int x){return 3;}

int main(){
  int (*z)(int) = f;
}
ltcmelo commented 3 years ago

Hi @xavierpinho , thank you for the report! Indeed this is a bug, but it's duplicate of #12 , which was reported just a bit ealier than yours; so, I'll mark this one as a duplicate — sorry, but I can't give a bounty for it (perhaps you find another…?)

xavierpinho commented 3 years ago

Oh, I completely missed #12! sorry. I'm closing this then.

Best,