[Bug c/63591] No syntax error yielded for semicolons inside a function proto, instead code with memory corruption can be created
manu at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Oct 18 23:07:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63591
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Last reconfirmed| |2014-10-18
Resolution|INVALID |---
Ever confirmed|0 |1
--- Comment #4 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
Ah, I get it know. Your testcase was not complete. Please follow
https://gcc.gnu.org/bugs/ when reporting bugs. You will avoid a lot of
confusion.
A complete minimal testcase:
struct Happ;
extern int afunction(
int anint,
struct Happ *happ; // <- Extra semicolon
);
I think we should warn for this case, or even not accept it at all. The above
is clearly not the use intended for VLAs because:
1) happ cannot be the length of the array
2) there are no arguments to the function, so a foward declaration is useless.
If you *really* think this is a serious bug, why not help us to fix it?
https://gcc.gnu.org/wiki/GettingStarted#Basics:_Contributing_to_GCC_in_10_easy_steps
More information about the Gcc-bugs
mailing list