Bug 29024 - [4.1 Regression] storage class specifier accepted for typedef (clause 7.1.1 ; 1)
Summary: [4.1 Regression] storage class specifier accepted for typedef (clause 7.1.1 ; 1)
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.2.0
: P2 normal
Target Milestone: 4.2.0
Assignee: Not yet assigned to anyone
URL:
Keywords: accepts-invalid, monitored
Depends on:
Blocks: 29843
  Show dependency treegraph
 
Reported: 2006-09-11 20:29 UTC by Jorn Wolfgang Rennecke
Modified: 2008-07-04 15:52 UTC (History)
4 users (show)

See Also:
Host:
Target:
Build:
Known to work: 3.4.0 3.0.4 2.95.3 3.3.3 3.2.3 4.2.0
Known to fail: 4.0.0 4.0.4 4.1.0 4.1.3
Last reconfirmed: 2006-09-23 13:31:11


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jorn Wolfgang Rennecke 2006-09-11 20:29:35 UTC
The following requires a diagnostic:

typedef static int T;
Comment 1 Andrew Pinski 2006-09-11 20:50:09 UTC
Confirmed, a regression from 3.4.0.
Comment 2 Lee Millward 2006-09-23 13:31:11 UTC
Testing a patch.
Comment 3 patchapp@dberlin.org 2006-09-23 16:10:20 UTC
Subject: Bug number PR c++/29024

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is http://gcc.gnu.org/ml/gcc-patches/2006-09/msg01016.html
Comment 4 Lee Millward 2006-10-11 19:31:44 UTC
Subject: Bug 29024

Author: lmillward
Date: Wed Oct 11 19:31:33 2006
New Revision: 117641

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=117641
Log:
        PR c++/29024
        * cp-tree (struct cp_decl_specifier_seq): Rename to 
        conflicting_specifiers_p
        * parser.c (cp_parser_set_storage_class): Set
        conflicting_specifiers_p for the input decl specifier 
        if a typedef specifier is present. Rename uses of
        multiple_specifiers_p to conflicting_specifiers_p.
        (cp_parser_decl_specifier_seq) <RID_TYPEDEF>: If a storage 
        class specifier has already been set for this declaration, 
        set conflicting_specifiers_p to true on the decl_specs.
        * decl.c (grokdeclarator): Rename uses of
        multiple_specifiers_p to conflicting_specifiers_p.

        * g++.dg/parse/typedef8.C: New test.
        * g++.dg/other/mult-stor1.C: Adjust error markers.


Added:
    trunk/gcc/testsuite/g++.dg/parse/typedef8.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/cp-tree.h
    trunk/gcc/cp/decl.c
    trunk/gcc/cp/parser.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/g++.dg/other/mult-stor1.C

Comment 5 Lee Millward 2006-10-11 19:43:22 UTC
Fixed on mainline.
Comment 6 Gabriel Dos Reis 2007-02-03 20:04:00 UTC
won't fix in GCC-4.0.x.  Adjusting milestone.
Comment 7 Joseph S. Myers 2008-07-04 15:52:10 UTC
Closing 4.1 branch.