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

            Bug ID: 96118
           Summary: GCC accepts invalid combination of two type specifiers
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: haoxintu at gmail dot com
  Target Milestone: ---

Hi, all.

This code, combines a typedef specifier and a normal type specifier, might be
an invalid code. 

$cat test.cc
typedef long typedef_long;
typedef_long long var = 10;

GCC accept this well.

While in clang:
error: 'long type-name' is invalid

in icc:
error: invalid combination of type specifiers

in msvc:
error C2628: 'typedef_long' followed by 'long' is illegal (did you forget a
';'?)

All versions from GCC 4.0 to trunk behave the same.

Thanks,
Haoxin

Reply via email to