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

[Bug c/22414] assert(i) gives "will never be executed" due to noreturn


------- 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


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