c/9482: math builtins are always visible

Andreas Jaeger aj@suse.de
Tue Jan 28 16:56:00 GMT 2003


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

From: Andreas Jaeger <aj@suse.de>
To: "Christian Ehrhardt" <ehrhardt@mathematik.uni-ulm.de>
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c/9482: math builtins are always visible
Date: Tue, 28 Jan 2003 17:50:20 +0100

 "Christian Ehrhardt" <ehrhardt@mathematik.uni-ulm.de> writes:
 
 > On Tue, Jan 28, 2003 at 05:03:15PM +0100, aj@suse.de wrote:
 >> According to ISO C99, log is only a reserved identifier if <math.h> is
 >> included.  But <math.h> is not included in the example above and
 >> therefore compilation should succeed.  But it fails as follows:
 >
 > My version of the standard says in 7.1.3:
 >    All identifiers with external linkage in any of the following subclauses
 >    (including the future library directions) are always reserved for use as
 >    identifiers with external linkage.
 > This doesn't mention the header file. Note that macros are a different
 > story. These are indeed only reserved if the appropriate header in included.
 > If you agree on this I'll close the report.
 
 I do not (yet;-) agree.
 
 Footnote 154 mentions: "The list of reserved identifiers with external
 linkage includes errno, setjmp, and va_end.".
 
 I do not think that "log" is meant here but rather meant in the item a
 bit further, where 7.1.3 says:
 "Each identifier with file scope listed in any of the
  following subclauses (including the future library directions) is
  reserved for use as a macro name and as an identifier with file scope
  in the same name space if any of its associated headers is included."
 
 So, the question boils down IMO to whether "log" has "file scope" or
 "external linkage".
 
 Andreas
 -- 
  Andreas Jaeger
   SuSE Labs aj@suse.de
    private aj@arthur.inka.de
     http://www.suse.de/~aj



More information about the Gcc-prs mailing list