This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
c/460: __func__ semantics
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c/460: __func__ semantics
- From: Joseph Myers <jsm28 at cam dot ac dot uk>
- Date: Thu, 10 Aug 2000 10:51:02 +0000
- Cc: jsm28 at cam dot ac dot uk
- Resent-Cc: gcc-prs at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org
- Resent-Reply-To: gcc-gnats@gcc.gnu.org, Joseph Myers <jsm28@cam.ac.uk>
>Number: 460
>Category: c
>Synopsis: __func__ semantics
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Aug 10 03:56:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: Joseph S. Myers
>Release: 2.96
>Organization:
none
>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
>Description:
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.
>How-To-Repeat:
See gcc.dg/c99-func-2.c for the first point. Another test may be
written for the other points.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: