This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/63591] No syntax error yielded for semicolons inside a function proto, instead code with memory corruption can be created
- From: "k.s.matheussen at notam02 dot no" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 18 Oct 2014 23:05:30 +0000
- Subject: [Bug c/63591] No syntax error yielded for semicolons inside a function proto, instead code with memory corruption can be created
- Auto-submitted: auto-generated
- References: <bug-63591-4 at http dot gcc dot gnu dot org/bugzilla/>
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)