* [Bug c/65377] [5.0 Regression] cpp attribute check ala clang fails to compile
2015-03-10 10:40 [Bug c/65377] New: [5.0 Regression] cpp attribute check ala clang fails to compile npl at chello dot at
@ 2015-03-10 10:44 ` mpolacek at gcc dot gnu.org
2015-03-10 10:46 ` trippels at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-03-10 10:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65377
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mpolacek at gcc dot gnu.org
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Why should it? We don't define __clang_major__.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/65377] [5.0 Regression] cpp attribute check ala clang fails to compile
2015-03-10 10:40 [Bug c/65377] New: [5.0 Regression] cpp attribute check ala clang fails to compile npl at chello dot at
2015-03-10 10:44 ` [Bug c/65377] " mpolacek at gcc dot gnu.org
@ 2015-03-10 10:46 ` trippels at gcc dot gnu.org
2015-03-10 10:52 ` npl at chello dot at
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-03-10 10:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65377
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |trippels at gcc dot gnu.org
Resolution|--- |INVALID
--- Comment #2 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
If you want to compile C++ use g++.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/65377] [5.0 Regression] cpp attribute check ala clang fails to compile
2015-03-10 10:40 [Bug c/65377] New: [5.0 Regression] cpp attribute check ala clang fails to compile npl at chello dot at
2015-03-10 10:44 ` [Bug c/65377] " mpolacek at gcc dot gnu.org
2015-03-10 10:46 ` trippels at gcc dot gnu.org
@ 2015-03-10 10:52 ` npl at chello dot at
2015-03-10 10:59 ` trippels at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: npl at chello dot at @ 2015-03-10 10:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65377
npl at chello dot at changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |---
--- Comment #3 from npl at chello dot at ---
1) It simply shouldnt fail.
2) this is a generic header for C and C++.
__has_cpp_attribute(clang::fallthrough) should resolve to 0 and not fail. This
is a bug in gcc, unless you can explain why it shouldnt resolve to 0.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/65377] [5.0 Regression] cpp attribute check ala clang fails to compile
2015-03-10 10:40 [Bug c/65377] New: [5.0 Regression] cpp attribute check ala clang fails to compile npl at chello dot at
` (2 preceding siblings ...)
2015-03-10 10:52 ` npl at chello dot at
@ 2015-03-10 10:59 ` trippels at gcc dot gnu.org
2015-03-10 11:01 ` pinskia at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-03-10 10:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65377
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #4 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
even "clang test.c" fails. Either rename it to test.cpp or use g++.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/65377] [5.0 Regression] cpp attribute check ala clang fails to compile
2015-03-10 10:40 [Bug c/65377] New: [5.0 Regression] cpp attribute check ala clang fails to compile npl at chello dot at
` (3 preceding siblings ...)
2015-03-10 10:59 ` trippels at gcc dot gnu.org
@ 2015-03-10 11:01 ` pinskia at gcc dot gnu.org
2015-03-10 11:02 ` npl at chello dot at
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2015-03-10 11:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65377
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Use the proper check if you are want check if you are compiling c++ code first.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/65377] [5.0 Regression] cpp attribute check ala clang fails to compile
2015-03-10 10:40 [Bug c/65377] New: [5.0 Regression] cpp attribute check ala clang fails to compile npl at chello dot at
` (4 preceding siblings ...)
2015-03-10 11:01 ` pinskia at gcc dot gnu.org
@ 2015-03-10 11:02 ` npl at chello dot at
2015-03-10 11:07 ` trippels at gcc dot gnu.org
2015-03-10 11:19 ` npl at chello dot at
7 siblings, 0 replies; 9+ messages in thread
From: npl at chello dot at @ 2015-03-10 11:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65377
--- Comment #6 from npl at chello dot at ---
(In reply to npl from comment #3)
> 1) It simply shouldnt fail.
> 2) this is a generic header for C and C++.
>
> __has_cpp_attribute(clang::fallthrough) should resolve to 0 and not fail.
> This is a bug in gcc, unless you can explain why it shouldnt resolve to 0.
I think gcc should simply ignore the __has_cpp_attribute macro, unless it does
compile C++ code?
if I use other names than __has_cpp_attribute it compiles. I will put some C++
guards around this code, but I still think this is a bug?
(And I am compiling with Clang 3.4, but this doesnt support the feature check)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/65377] [5.0 Regression] cpp attribute check ala clang fails to compile
2015-03-10 10:40 [Bug c/65377] New: [5.0 Regression] cpp attribute check ala clang fails to compile npl at chello dot at
` (5 preceding siblings ...)
2015-03-10 11:02 ` npl at chello dot at
@ 2015-03-10 11:07 ` trippels at gcc dot gnu.org
2015-03-10 11:19 ` npl at chello dot at
7 siblings, 0 replies; 9+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-03-10 11:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65377
--- Comment #7 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Unfortunately https://gcc.gnu.org/ml/gcc-patches/2015-01/msg02357.html hasn't
been checked in yet.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/65377] [5.0 Regression] cpp attribute check ala clang fails to compile
2015-03-10 10:40 [Bug c/65377] New: [5.0 Regression] cpp attribute check ala clang fails to compile npl at chello dot at
` (6 preceding siblings ...)
2015-03-10 11:07 ` trippels at gcc dot gnu.org
@ 2015-03-10 11:19 ` npl at chello dot at
7 siblings, 0 replies; 9+ messages in thread
From: npl at chello dot at @ 2015-03-10 11:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65377
--- Comment #8 from npl at chello dot at ---
This (and the Iso recommendation) doesnt answer the question whether the
__has_cpp_attribute macro should be defined for C sources either (it seems
illogical to me).
Guess its undefined and not a bug, I wont bother you anymore =)
^ permalink raw reply [flat|nested] 9+ messages in thread