This is GCC Bugzilla
This is GCC Bugzilla Version 2.20+
View Bug Activity | Format For Printing | Clone This Bug
The detailed semantics of __func__ in GCC differ from those of the C99 standard: * __func__ is not a string literal and should not take part in string concatenation. * Nor should __func__ be merged with identical string literals; it is a separate array object. * __func__ is an array of const char, not of plain char. This should not depend on -Wwrite-strings or -fwritable-strings. Release: 2.96 Environment: System: Linux decomino 2.2.16 #1 Thu Jun 8 00:26:22 UTC 2000 i686 unknown Architecture: i686 host: i686-pc-linux-gnu build: i686-pc-linux-gnu target: i686-pc-linux-gnu How-To-Repeat: See gcc.dg/c99-func-2.c for the first point. Another test may be written for the other points.
From: "Joseph S. Myers" <jsm28@cam.ac.uk> To: gcc-gnats@gcc.gnu.org Cc: Subject: Re: c/460: __func__ semantics Date: Tue, 15 Aug 2000 19:10:33 +0100 (BST) Tests for merging of __func__ and for its type have been added as c99-func-3.c and c99-func-4.c. -- Joseph S. Myers jsm28@cam.ac.uk
State-Changed-From-To: open->analyzed State-Changed-Why: Confirmed.
From: neil@gcc.gnu.org To: gcc-gnats@gcc.gnu.org, jsm28@cam.ac.uk, nobody@gcc.gnu.org Cc: Subject: Re: c/460 Date: 22 Feb 2001 23:33:36 -0000 Synopsis: __func__ semantics State-Changed-From-To: open->analyzed State-Changed-By: neil State-Changed-When: Thu Feb 22 15:33:36 2001 State-Changed-Why: Confirmed. http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=460&database=gcc
Responsible-Changed-From-To: unassigned->nathan Responsible-Changed-Why: the correct semantics will fall out of the lazy decl creation patch that Zack & I are working on.
From: nathan@gcc.gnu.org To: gcc-gnats@gcc.gnu.org, jsm28@cam.ac.uk, nathan@gcc.gnu.org, nobody@gcc.gnu.org Cc: Subject: Re: c/460 Date: 19 Apr 2001 15:27:33 -0000 Synopsis: __func__ semantics Responsible-Changed-From-To: unassigned->nathan Responsible-Changed-By: nathan Responsible-Changed-When: Thu Apr 19 08:27:33 2001 Responsible-Changed-Why: the correct semantics will fall out of the lazy decl creation patch that Zack & I are working on. http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=460&database=gcc
State-Changed-From-To: analyzed->closed State-Changed-Why: Fixed with the lazy __FUNCTION__ implementation.
From: nathan@gcc.gnu.org To: gcc-gnats@gcc.gnu.org, jsm28@cam.ac.uk, nathan@gcc.gnu.org Cc: Subject: Re: c/460 Date: 24 Apr 2001 08:37:03 -0000 Synopsis: __func__ semantics State-Changed-From-To: analyzed->closed State-Changed-By: nathan State-Changed-When: Tue Apr 24 01:37:02 2001 State-Changed-Why: Fixed with the lazy __FUNCTION__ implementation. http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=460&database=gcc