This is the mail archive of the gcc-bugs@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]
Other format: [Raw text]

[Bug c++/13698] New: Parsing error for new constructs


Current mainline cannot parse the following:

int
main ()
{
    new void*;
    new (void*);

    new void* [2];
    new (void*) [2];		// gcc 3.4 fails

    new (int (*[10])());
    new (int (*[10])()) [2];	// gcc 3.4 fails
}

paolo:~> g++ -c arvin.cc
arvin.cc: In function `int main()':
arvin.cc:8: error: expected `;'
arvin.cc:11: error: expected `;'

Seems a regression: is accepted by both 3.3.2 and icc8 in strict mode.

-- 
           Summary: Parsing error for new constructs
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: paolo at gcc dot gnu dot org
                CC: aj at suse dot de,arvin at suse dot de,gcc-bugs at gcc
                    dot gnu dot org
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13698


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