public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/64248] New: Error: declarator-id missing; using reserved word ‘__FUNCTION__’
@ 2014-12-10  6:53 theubik at mail dot ru
  2014-12-10  7:06 ` [Bug c++/64248] [5 Regression] " trippels at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: theubik at mail dot ru @ 2014-12-10  6:53 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64248

            Bug ID: 64248
           Summary: Error: declarator-id missing; using reserved word
                    ‘__FUNCTION__’
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: theubik at mail dot ru

Created attachment 34236
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34236&action=edit
gcc -v output

class A
{
public:
    A(const char* str) {};
};

class B
{
public:
    B(A a) {};
};

int main()
{
   B b(A(__FUNCTION__));
   return 0;
}

> gcc main.cpp
main.cpp: In function ‘int main()’:
main.cpp:15:22: error: declarator-id missing; using reserved word
‘__FUNCTION__’
    B b(A(__FUNCTION__));
                      ^

gcc was built from snapshot http://gcc.skazkaforyou.com/snapshots/5-20141207/
os Linux ubik 3.2.0-70-generic #105-Ubuntu SMP Wed Sep 24 19:49:16 UTC 2014
x86_64 x86_64 x86_64 GNU/Linux
>From gcc-bugs-return-469996-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Dec 10 07:01:56 2014
Return-Path: <gcc-bugs-return-469996-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 23156 invoked by alias); 10 Dec 2014 07:01:56 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 23123 invoked by uid 48); 10 Dec 2014 07:01:51 -0000
From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/60694] Gcc-4.2.4 hangs during compilation of the attached test
Date: Wed, 10 Dec 2014 07:01:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: tree-optimization
X-Bugzilla-Version: 4.2.4
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: mpolacek at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status cc resolution
Message-ID: <bug-60694-4-MWyZ5UQNd1@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-60694-4@http.gcc.gnu.org/bugzilla/>
References: <bug-60694-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-12/txt/msg01003.txt.bz2
Content-length: 518

https://gcc.gnu.org/bugzilla/show_bug.cgi?id`694

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |mpolacek at gcc dot gnu.org
         Resolution|---                         |FIXED

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Already fixed thus.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/64248] [5 Regression] Error: declarator-id missing; using reserved word ‘__FUNCTION__’
  2014-12-10  6:53 [Bug c++/64248] New: Error: declarator-id missing; using reserved word ‘__FUNCTION__’ theubik at mail dot ru
@ 2014-12-10  7:06 ` trippels at gcc dot gnu.org
  2014-12-10  7:46 ` theubik at mail dot ru
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-12-10  7:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64248

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|x86_64-linux-gnu            |
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-12-10
                 CC|                            |jason at gcc dot gnu.org,
                   |                            |trippels at gcc dot gnu.org
               Host|x86_64-linux-gnu            |
   Target Milestone|---                         |5.0
            Summary|Error: declarator-id        |[5 Regression] Error:
                   |missing; using reserved     |declarator-id missing;
                   |word ‘__FUNCTION__’         |using reserved word
                   |                            |‘__FUNCTION__’
     Ever confirmed|0                           |1
              Build|x86_64-linux-gnu            |

--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Probably more outfall from r217241.
>From gcc-bugs-return-469998-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Dec 10 07:08:50 2014
Return-Path: <gcc-bugs-return-469998-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 28788 invoked by alias); 10 Dec 2014 07:08:50 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 28763 invoked by uid 48); 10 Dec 2014 07:08:47 -0000
From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/59592] Segmentation fault in fold_comparison at -O1
Date: Wed, 10 Dec 2014 07:08:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: tree-optimization
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: mpolacek at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status cc resolution
Message-ID: <bug-59592-4-WEaLUTmbSe@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-59592-4@http.gcc.gnu.org/bugzilla/>
References: <bug-59592-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-12/txt/msg01005.txt.bz2
Content-length: 537

https://gcc.gnu.org/bugzilla/show_bug.cgi?idY592

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |mpolacek at gcc dot gnu.org
         Resolution|---                         |FIXED

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
All active branches seem to be ok now.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/64248] [5 Regression] Error: declarator-id missing; using reserved word ‘__FUNCTION__’
  2014-12-10  6:53 [Bug c++/64248] New: Error: declarator-id missing; using reserved word ‘__FUNCTION__’ theubik at mail dot ru
  2014-12-10  7:06 ` [Bug c++/64248] [5 Regression] " trippels at gcc dot gnu.org
@ 2014-12-10  7:46 ` theubik at mail dot ru
  2014-12-10  7:48 ` trippels at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: theubik at mail dot ru @ 2014-12-10  7:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64248

--- Comment #2 from theubik at mail dot ru ---
(In reply to Markus Trippelsdorf from comment #1)
> Probably more outfall from r217241.

it's not a bug?


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/64248] [5 Regression] Error: declarator-id missing; using reserved word ‘__FUNCTION__’
  2014-12-10  6:53 [Bug c++/64248] New: Error: declarator-id missing; using reserved word ‘__FUNCTION__’ theubik at mail dot ru
  2014-12-10  7:06 ` [Bug c++/64248] [5 Regression] " trippels at gcc dot gnu.org
  2014-12-10  7:46 ` theubik at mail dot ru
@ 2014-12-10  7:48 ` trippels at gcc dot gnu.org
  2014-12-10 12:25 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-12-10  7:48 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64248

--- Comment #3 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
(In reply to theubik from comment #2)
> (In reply to Markus Trippelsdorf from comment #1)
> > Probably more outfall from r217241.
> 
> it's not a bug?

Sure it is.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/64248] [5 Regression] Error: declarator-id missing; using reserved word ‘__FUNCTION__’
  2014-12-10  6:53 [Bug c++/64248] New: Error: declarator-id missing; using reserved word ‘__FUNCTION__’ theubik at mail dot ru
                   ` (2 preceding siblings ...)
  2014-12-10  7:48 ` trippels at gcc dot gnu.org
@ 2014-12-10 12:25 ` rguenth at gcc dot gnu.org
  2014-12-10 22:38 ` jason at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-12-10 12:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64248

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid
           Priority|P3                          |P1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/64248] [5 Regression] Error: declarator-id missing; using reserved word ‘__FUNCTION__’
  2014-12-10  6:53 [Bug c++/64248] New: Error: declarator-id missing; using reserved word ‘__FUNCTION__’ theubik at mail dot ru
                   ` (3 preceding siblings ...)
  2014-12-10 12:25 ` rguenth at gcc dot gnu.org
@ 2014-12-10 22:38 ` jason at gcc dot gnu.org
  2014-12-12  3:49 ` jason at gcc dot gnu.org
  2014-12-12  3:57 ` jason at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2014-12-10 22:38 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64248

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |jason at gcc dot gnu.org

--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> ---
It's not clear to me that this is a bug.  As far as I can tell from the
standard, __func__ is an identifier, not a keyword, so the declaration of b
declares a function taking an A parameter named __FUNCTION__.  But there seems
to be no good reason to fight against existing practice on this, so I'm going
to revert the change.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/64248] [5 Regression] Error: declarator-id missing; using reserved word ‘__FUNCTION__’
  2014-12-10  6:53 [Bug c++/64248] New: Error: declarator-id missing; using reserved word ‘__FUNCTION__’ theubik at mail dot ru
                   ` (4 preceding siblings ...)
  2014-12-10 22:38 ` jason at gcc dot gnu.org
@ 2014-12-12  3:49 ` jason at gcc dot gnu.org
  2014-12-12  3:57 ` jason at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2014-12-12  3:49 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64248

--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Fri Dec 12 03:49:03 2014
New Revision: 218654

URL: https://gcc.gnu.org/viewcvs?rev=218654&root=gcc&view=rev
Log:
    PR c++/64248
    Revert:
    * parser.c (cp_parser_unqualified_id): Handle __func__ here.
    (cp_parser_primary_expression): Not here.

Added:
    trunk/gcc/testsuite/g++.dg/parse/fnname2.C
Removed:
    trunk/gcc/testsuite/g++.dg/cpp0x/decltype-func.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/parser.c
    trunk/gcc/testsuite/g++.dg/other/error34.C


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/64248] [5 Regression] Error: declarator-id missing; using reserved word ‘__FUNCTION__’
  2014-12-10  6:53 [Bug c++/64248] New: Error: declarator-id missing; using reserved word ‘__FUNCTION__’ theubik at mail dot ru
                   ` (5 preceding siblings ...)
  2014-12-12  3:49 ` jason at gcc dot gnu.org
@ 2014-12-12  3:57 ` jason at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2014-12-12  3:57 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64248

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #6 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-12-12  3:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-10  6:53 [Bug c++/64248] New: Error: declarator-id missing; using reserved word ‘__FUNCTION__’ theubik at mail dot ru
2014-12-10  7:06 ` [Bug c++/64248] [5 Regression] " trippels at gcc dot gnu.org
2014-12-10  7:46 ` theubik at mail dot ru
2014-12-10  7:48 ` trippels at gcc dot gnu.org
2014-12-10 12:25 ` rguenth at gcc dot gnu.org
2014-12-10 22:38 ` jason at gcc dot gnu.org
2014-12-12  3:49 ` jason at gcc dot gnu.org
2014-12-12  3:57 ` jason at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).