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

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).