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]

c/460: __func__ semantics



>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:

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