[Bug c/22414] assert(i) gives "will never be executed" due to noreturn
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon Jul 11 19:52:00 GMT 2005
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-11 19:50 -------
The warning is correct as there is an assigment for a temporary.
The assert should be written like:
void abort(void);
void f(int i)
{
i ?(void) 0 : abort();
}
Please report this bug to glibc.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22414
More information about the Gcc-bugs
mailing list