This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How to make 'control reaches end of non-void function' a fatal error ?
- To: gcc at gcc dot gnu dot org
- Subject: Re: How to make 'control reaches end of non-void function' a fatal error ?
- From: Jan Dvorak <johnydog at go dot cz>
- Date: Fri, 25 Aug 2000 21:55:51 +0200
- Organization: (XNET.cz)
On Fri, Aug 25, 2000 at 08:50:50PM +0200, Matthias Kurz wrote:
>
> Hi.
>
> This hit me numerous times. Now it's enough !
> Does anybody know how i could turn the warning
> "control reaches end of non-void function"
> into a fatal catastrophic error that aborts and stops everything ?
> Something more sophisticated than grepping the error log.
>
by adding -Werror, every warning is threaten as fatal error, but this can't be
done selectively, only for all warnings. But it is always good to write
code which compiles without warnings at -Wall, and you can selectively
turn off warnings which you are aware about, but you can't fix them
immiedately.
Jan Dvorak <johnydog@go.cz>