public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug preprocessor/112978] New: Five minute long error message when OpenMP pragma is erroneously placed in macro @ 2023-12-12 5:40 raymondkenchang at gmail dot com 2023-12-12 5:46 ` [Bug preprocessor/112978] " pinskia at gcc dot gnu.org ` (2 more replies) 0 siblings, 3 replies; 4+ messages in thread From: raymondkenchang at gmail dot com @ 2023-12-12 5:40 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112978 Bug ID: 112978 Summary: Five minute long error message when OpenMP pragma is erroneously placed in macro Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: preprocessor Assignee: unassigned at gcc dot gnu.org Reporter: raymondkenchang at gmail dot com Target Milestone: --- When an OpenMP pragma is placed in a macro definition incorrectly, the error message is extremly long. It took 5 minutes on my machine to output. ``` ``` ``` ./compilers/gcc_install/bin/gcc -c -fopenmp hello.c 23.68s user 8.56s system 10% cpu 5:06.35 total ``` Test case: ``` #define LIM1(x) x##0, x##1, x##2, x##3, x##4, x##5, x##6, x##7, x##8, x##9, #define LIM2(x) LIM1(x##0) LIM1(x##1) LIM1(x##2) LIM1(x##3) LIM1(x##4) \ LIM1(x##5) LIM1(x##6) LIM1(x##7) LIM1(x##8) LIM1(x##9) #define LIM3(x) LIM2(x##0) LIM2(x##1) LIM2(x##2) LIM2(x##3) LIM2(x##4) \ LIM2(x##5) LIM2(x##6) LIM2(x##7) LIM2(x##8) LIM2(x##9) #define LIM4(x) LIM3(x##0) LIM3(x##1) LIM3(x##2) LIM3(x##3) LIM3(x##4) \ LIM3(x##5) LIM3(x##6) LIM3(x##7) LIM3(x##8) LIM3(x##9) #define LIM5(x) LIM4(x##0) LIM4(x##1) LIM4(x##2) LIM4(x##3) LIM4(x##4) \ LIM4(x##5) LIM4(x##6) LIM4(x##7) LIM4(x##8) LIM4(x##9) #define LIM6(x) LIM5(x##0) LIM5(x##1) LIM5(x##2) LIM5(x##3) LIM5(x##4) \ #pragma omp barrier LIM5(x##5) LIM5(x##6) LIM5(x##7) LIM5(x##8) LIM5(x##9) #define LIM7(x) LIM6(x##0) LIM6(x##1) LIM6(x##2) LIM6(x##3) LIM6(x##4) \ LIM6(x##5) LIM6(x##6) LIM6(x##7) LIM6(x##8) LIM6(x##9) enum q21_enum { LIM5 (e) }; ``` ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug preprocessor/112978] Five minute long error message when OpenMP pragma is erroneously placed in macro 2023-12-12 5:40 [Bug preprocessor/112978] New: Five minute long error message when OpenMP pragma is erroneously placed in macro raymondkenchang at gmail dot com @ 2023-12-12 5:46 ` pinskia at gcc dot gnu.org 2023-12-12 5:48 ` raymondkenchang at gmail dot com 2023-12-12 19:13 ` xry111 at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: pinskia at gcc dot gnu.org @ 2023-12-12 5:46 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112978 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |compile-time-hog --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- I doubt this is fixable really because the number of expansions is huge. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug preprocessor/112978] Five minute long error message when OpenMP pragma is erroneously placed in macro 2023-12-12 5:40 [Bug preprocessor/112978] New: Five minute long error message when OpenMP pragma is erroneously placed in macro raymondkenchang at gmail dot com 2023-12-12 5:46 ` [Bug preprocessor/112978] " pinskia at gcc dot gnu.org @ 2023-12-12 5:48 ` raymondkenchang at gmail dot com 2023-12-12 19:13 ` xry111 at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: raymondkenchang at gmail dot com @ 2023-12-12 5:48 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112978 --- Comment #2 from Raymond Chang <raymondkenchang at gmail dot com> --- (In reply to Andrew Pinski from comment #1) > I doubt this is fixable really because the number of expansions is huge. Thanks, I think this is a pretty uncommon situtation anyways. I figured I'd report it anyways though. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug preprocessor/112978] Five minute long error message when OpenMP pragma is erroneously placed in macro 2023-12-12 5:40 [Bug preprocessor/112978] New: Five minute long error message when OpenMP pragma is erroneously placed in macro raymondkenchang at gmail dot com 2023-12-12 5:46 ` [Bug preprocessor/112978] " pinskia at gcc dot gnu.org 2023-12-12 5:48 ` raymondkenchang at gmail dot com @ 2023-12-12 19:13 ` xry111 at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: xry111 at gcc dot gnu.org @ 2023-12-12 19:13 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112978 Xi Ruoyao <xry111 at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED CC| |xry111 at gcc dot gnu.org Resolution|--- |WONTFIX --- Comment #3 from Xi Ruoyao <xry111 at gcc dot gnu.org> --- There is nothing we can do here. Note that GCC security policy is clear that if you need to compile some random code completely not trust-able, use a sandbox. And for "excessive amount of diagnostics" you may use -fmax-errors= as a workaround. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-12-12 19:13 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2023-12-12 5:40 [Bug preprocessor/112978] New: Five minute long error message when OpenMP pragma is erroneously placed in macro raymondkenchang at gmail dot com 2023-12-12 5:46 ` [Bug preprocessor/112978] " pinskia at gcc dot gnu.org 2023-12-12 5:48 ` raymondkenchang at gmail dot com 2023-12-12 19:13 ` xry111 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).