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

Re: c/1623


The following reply was made to PR c/1623; it has been noted by GNATS.

From: jsm28@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org, jsm28@cam.ac.uk, neel@eng.sun.com,
  nobody@gcc.gnu.org
Cc:  
Subject: Re: c/1623
Date: 13 Jan 2001 20:24:39 -0000

 Synopsis: GCC allows void function to return value
 
 State-Changed-From-To: open->closed
 State-Changed-By: jsm28
 State-Changed-When: Sat Jan 13 12:24:39 2001
 State-Changed-Why:
     A warning (in this case, on by default) is a diagnostic;
     GCC is telling you about the problem with your code.
     With -pedantic-errors, it becomes an error.  To quote the
     manual:
     
        GCC always tries to compile your program if possible; it never
     gratuitously rejects a program whose meaning is clear merely because
     (for instance) it fails to conform to a standard.
     
     and
     
        * If the compiler does not produce an error message for invalid
          input, that is a compiler bug.  However, you should note that your
          idea of "invalid input" might be my idea of "an extension" or
          "support for traditional practice".
     
     So, the compiler tells you about the problem, and compiles
     the code anyway, as intended.  It's up to the programmer
     to use the warning to clean up their code.
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=1623&database=gcc

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