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

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

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