[Bug c++/101168] New: gnu++14 complains about altivec types defined with using keyword in the same file with preprocessor macros

tuliom at ascii dot art.br gcc-bugzilla@gcc.gnu.org
Tue Jun 22 18:48:36 GMT 2021


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

            Bug ID: 101168
           Summary: gnu++14 complains about altivec types defined with
                    using keyword in the same file with preprocessor
                    macros
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tuliom at ascii dot art.br
  Target Milestone: ---

Step to reproduce the error:

$ cat issue.cc 
#include <altivec.h>
using vdbl =  __vector double;

#define BREAK 1
$ g++ -std=gnu++14 -c issue.cc 
issue.cc:4:15: error: expected type-specifier before numeric constant
    4 | #define BREAK 1
      |               ^
issue.cc:4:9: note: in expansion of macro ‘BREAK’
    4 | #define BREAK 1
      |         ^~~~~

The error does not reproduce when using -std=c++14.


More information about the Gcc-bugs mailing list