First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 460
Product:  
Component:  
Status: RESOLVED
Resolution: FIXED
Assigned To: Nathan Sidwell <nathan@gcc.gnu.org>
Host:
Reported against  
Priority:  
Severity:  
Target Milestone:  
 
 
Target:
Reporter: Joseph S. Myers <jsm28@gcc.gnu.org>
Add CC:
CC:
Remove selected CCs
Build:
URL:
Summary:
Keywords:
Known to work:
Known to fail:

Attachment Description Type Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 460 depends on: Show dependency tree
Show dependency graph
Bug 460 blocks:

Additional Comments:






View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: Opened: 2000-08-10 03:56
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.

------- Comment #1 From Joseph S. Myers 2000-08-15 19:10 -------
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
 

------- Comment #2 From Neil Booth 2001-02-22 15:33 -------
State-Changed-From-To: open->analyzed
State-Changed-Why: Confirmed.

------- Comment #3 From Neil Booth 2001-02-22 23:33 -------
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

------- Comment #4 From Nathan Sidwell 2001-04-19 08:27 -------
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.

------- Comment #5 From Nathan Sidwell 2001-04-19 15:27 -------
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

------- Comment #6 From Nathan Sidwell 2001-04-24 01:37 -------
State-Changed-From-To: analyzed->closed
State-Changed-Why: Fixed with the lazy __FUNCTION__ implementation.

------- Comment #7 From Nathan Sidwell 2001-04-24 08:37 -------
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

First Last Prev Next    No search results available      Search page      Enter new bug