This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: How to force gcc to report a warning/error
- From: Ian Lance Taylor <iant at google dot com>
- To: Thomas Martitz <thomas dot martitz at student dot htw-berlin dot de>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Tue, 26 Oct 2010 06:37:06 -0700
- Subject: Re: How to force gcc to report a warning/error
- References: <82c376cc-76af-4a30-a683-b5603dd68b5f@email.android.com> <efd463ef-ab61-463b-87a7-639122ae200e@email.android.com>
Thomas Martitz <thomas.martitz@student.htw-berlin.de> writes:
> Assuming min() is a macro or a pure or inline function, shouldn't gcc issue a "statement without effect" warning because it has no side effects?
Yes. But that will only happen if min is indeed given the pure
attribute.
Ian