public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/101168] New: gnu++14 complains about altivec types defined with using keyword in the same file with preprocessor macros
@ 2021-06-22 18:48 tuliom at ascii dot art.br
2022-03-18 5:54 ` [Bug preprocessor/101168] " guojiufu at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: tuliom at ascii dot art.br @ 2021-06-22 18:48 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug preprocessor/101168] gnu++14 complains about altivec types defined with using keyword in the same file with preprocessor macros
2021-06-22 18:48 [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
@ 2022-03-18 5:54 ` guojiufu at gcc dot gnu.org
2022-05-10 3:36 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: guojiufu at gcc dot gnu.org @ 2022-03-18 5:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101168
Jiu Fu Guo <guojiufu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |guojiufu at gcc dot gnu.org
--- Comment #1 from Jiu Fu Guo <guojiufu at gcc dot gnu.org> ---
This issue seems can also be reproduced at at10.0(gcc6.4.1).
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug preprocessor/101168] gnu++14 complains about altivec types defined with using keyword in the same file with preprocessor macros
2021-06-22 18:48 [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
2022-03-18 5:54 ` [Bug preprocessor/101168] " guojiufu at gcc dot gnu.org
@ 2022-05-10 3:36 ` cvs-commit at gcc dot gnu.org
2022-05-12 2:53 ` guojiufu at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-05-10 3:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101168
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jiu Fu Guo <guojiufu@gcc.gnu.org>:
https://gcc.gnu.org/g:067fe66c8ba9b16feacf66fce9ae668091e42821
commit r13-220-g067fe66c8ba9b16feacf66fce9ae668091e42821
Author: Jiufu Guo <guojiufu@linux.ibm.com>
Date: Mon May 9 17:48:00 2022 +0800
rs6000: avoid peeking eof after __vector
There is a rare corner case: where vector is followed only by one
valid identifer and the ";" which is near the end of the file.
Like the case in PR101168:
using vdbl = __vector double;
#define BREAK 1
For this case, "vector double" is followed by CPP_SEMICOLON and then
EOF. There is no more tokens need to check for this case.
PR preprocessor/101168
gcc/ChangeLog:
* config/rs6000/rs6000-c.cc (rs6000_macro_to_expand):
Avoid empty identifier.
gcc/testsuite/ChangeLog:
* g++.target/powerpc/pr101168.C: New test.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug preprocessor/101168] gnu++14 complains about altivec types defined with using keyword in the same file with preprocessor macros
2021-06-22 18:48 [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
2022-03-18 5:54 ` [Bug preprocessor/101168] " guojiufu at gcc dot gnu.org
2022-05-10 3:36 ` cvs-commit at gcc dot gnu.org
@ 2022-05-12 2:53 ` guojiufu at gcc dot gnu.org
2024-03-26 6:59 ` pinskia at gcc dot gnu.org
2024-03-26 7:01 ` pinskia at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: guojiufu at gcc dot gnu.org @ 2022-05-12 2:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101168
Jiu Fu Guo <guojiufu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from Jiu Fu Guo <guojiufu at gcc dot gnu.org> ---
Fixed in trunk.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug preprocessor/101168] gnu++14 complains about altivec types defined with using keyword in the same file with preprocessor macros
2021-06-22 18:48 [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
` (2 preceding siblings ...)
2022-05-12 2:53 ` guojiufu at gcc dot gnu.org
@ 2024-03-26 6:59 ` pinskia at gcc dot gnu.org
2024-03-26 7:01 ` pinskia at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-03-26 6:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101168
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |13.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug preprocessor/101168] gnu++14 complains about altivec types defined with using keyword in the same file with preprocessor macros
2021-06-22 18:48 [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
` (3 preceding siblings ...)
2024-03-26 6:59 ` pinskia at gcc dot gnu.org
@ 2024-03-26 7:01 ` pinskia at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-03-26 7:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101168
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Note I noticed s390 has the similar issue, see PR 95782 .
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-03-26 7:01 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-22 18:48 [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
2022-03-18 5:54 ` [Bug preprocessor/101168] " guojiufu at gcc dot gnu.org
2022-05-10 3:36 ` cvs-commit at gcc dot gnu.org
2022-05-12 2:53 ` guojiufu at gcc dot gnu.org
2024-03-26 6:59 ` pinskia at gcc dot gnu.org
2024-03-26 7:01 ` pinskia 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).