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++/52003] New: warning about (un)existing return statement in the main function declared 'noreturn'


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

             Bug #: 52003
           Summary: warning about (un)existing return statement in the
                    main function declared 'noreturn'
    Classification: Unclassified
           Product: gcc
           Version: 4.5.3
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: gnumaurorusso@gmail.com


this function generates the warning :

function declared 'noreturn' has a 'return' statement

(at least it does with
-funsigned-char -funsigned-bitfields -O0 -fpack-struct -fshort-enums -g2 -Wall
options)

__attribute__((noreturn)) int main(void){
   while(1);
}


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