This is the mail archive of the gcc-patches@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]

Re: [tuples] Fix miscompilation of gimple.c


On Wed, Mar 5, 2008 at 6:32 PM, Diego Novillo <dnovillo@google.com> wrote:
> A void function should not return a value.

In C90/C99, it is valid to do return a(); if the return type is void
for both functions.  This is not valid C++ though.

So is this really a bug in the code or just a bug in the warnings not
doing it for -Wc++compat (or what ever that option is)?

-- Pinski


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