public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/97265] New: new warning with clang build
@ 2020-10-01 10:45 dcb314 at hotmail dot com
2020-10-01 11:52 ` [Bug c/97265] " redi at gcc dot gnu.org
2023-08-12 5:08 ` [Bug middle-end/97265] building vec.h produces warning with clang (const not implicitly with constexpr in C++14 and above) pinskia at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: dcb314 at hotmail dot com @ 2020-10-01 10:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97265
Bug ID: 97265
Summary: new warning with clang build
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: dcb314 at hotmail dot com
Target Milestone: ---
I just tried a build of gcc trunk with clang. It said
trunk.git/gcc/vec.h:543:13: warning: 'constexpr' non-static member function
will not be implicitly 'const' in C++14; add 'const' to avoid a change in
behavior [-Wconstexpr-not-const]
I don't remember this warning from last week's clang build.
Source code is
CONSTEXPR operator vec<T, A, L> () { return vec<T, A, L>(); }
My best guess is that
CONSTEXPR operator vec<T, A, L> () const { return vec<T, A, L>(); }
will shut up clang.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c/97265] new warning with clang build
2020-10-01 10:45 [Bug c/97265] New: new warning with clang build dcb314 at hotmail dot com
@ 2020-10-01 11:52 ` redi at gcc dot gnu.org
2023-08-12 5:08 ` [Bug middle-end/97265] building vec.h produces warning with clang (const not implicitly with constexpr in C++14 and above) pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2020-10-01 11:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97265
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2020-10-01
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Yes, your suggested change is correct, making the code mean the same thing in
both C++11 and C++14. It also makes the function more consistent whether
CONSTEXPR expands to constexpr or not.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug middle-end/97265] building vec.h produces warning with clang (const not implicitly with constexpr in C++14 and above)
2020-10-01 10:45 [Bug c/97265] New: new warning with clang build dcb314 at hotmail dot com
2020-10-01 11:52 ` [Bug c/97265] " redi at gcc dot gnu.org
@ 2023-08-12 5:08 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-08-12 5:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97265
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Target Milestone|--- |11.0
Status|NEW |RESOLVED
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed in GCC 11 by r11-5962-gda40a69c9ef878 .
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-08-12 5:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-01 10:45 [Bug c/97265] New: new warning with clang build dcb314 at hotmail dot com
2020-10-01 11:52 ` [Bug c/97265] " redi at gcc dot gnu.org
2023-08-12 5:08 ` [Bug middle-end/97265] building vec.h produces warning with clang (const not implicitly with constexpr in C++14 and above) 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).