This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/63591] No syntax error yielded for semicolons inside a function proto, instead code with memory corruption can be created


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63591

--- Comment #3 from Kjetil Matheussen <k.s.matheussen at notam02 dot no> ---
I didn't know about this gnu extension. But regardless, shouldn't gcc complain
when the proto doesn't match the function itself?

Also, although I don't understand how this extension works from the
documentation, I have a feeling that there should have been a warning or error
when compiling code calling "afunction" as well?

int main(){
  return afunction(5, NULL);
}

(this compiles just fine)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]