This is the mail archive of the gcc-help@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: warnings about empty function bodies.


"Ramana Radhakrishnan" <ramana.r@gmail.com> writes:

> Is there a warning flag to print out warning messages in case GCC
> compiles a function with an empty body ? I tried -Wextra and
> -Wempty-body but that didn't seem to work. The doco though for
> -Wempty-body suggests that this is only for empty if or for blocks.

I am not aware of any such warning.  -Wempty-body exists mainly to
catch stray semicolons as in "if (x == 0);".

Ian


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