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 middle-end/42674] [4.4/4.5 Regression] Bogus "no return statement in function returning non-void" warning



------- Comment #5 from jakub at gcc dot gnu dot org  2010-01-13 17:38 -------
The difference between C and C++ FE is just r138140, i.e. the && !TREE_PUBLIC
check.
Just try
extern void bar (void);
static int foo (void) __attribute__ ((__noreturn__, __used__));

static int
foo (void)
{
  while (1)
    bar ();
}

which warns both in C and C++.  I guess we should just add !TREE_THIS_VOLATILE
(fndecl) check to both C and C++ FE.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jakub at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2010-01-09 20:49:10         |2010-01-13 17:38:25
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42674


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