public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/97710] New: Help with breaking change? cast point-to-member address in template parameter list
@ 2020-11-03 22:02 mick.pearson at wildblue dot net
  2020-11-03 22:14 ` [Bug c++/97710] Help with breaking change? cast pointer-to-member " mpolacek at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: mick.pearson at wildblue dot net @ 2020-11-03 22:02 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97710

            Bug ID: 97710
           Summary: Help with breaking change? cast point-to-member
                    address in template parameter list
           Product: gcc
           Version: 10.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mick.pearson at wildblue dot net
  Target Milestone: ---

GCC used to agree with MSVC in letting pointer-to-member addresses be cast
inside templates, i.e. compile time constants. Cygwin updated me to 10.2.0 and
this now produces an "error: 'reinterpret_cast' is not a constant expression"
diagnostic.

The Clang tracker laughed at a request I made in the past to enable this for
Clang. (Please reach consensus? https://bugs.llvm.org/show_bug.cgi?id=33708) I
doubt Microsoft will break this in future versions of MSVC since that's not
it's style, so I wonder if this is an oversight in GCC, and if not what
recourse exists. 

Thank you, maybe related:
https://patchwork.ozlabs.org/project/gcc/patch/or604puqhd.fsf@lxoliva.fsfla.org/

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-04-09  0:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-03 22:02 [Bug c++/97710] New: Help with breaking change? cast point-to-member address in template parameter list mick.pearson at wildblue dot net
2020-11-03 22:14 ` [Bug c++/97710] Help with breaking change? cast pointer-to-member " mpolacek at gcc dot gnu.org
2020-11-04 11:27 ` mick.pearson at wildblue dot net
2020-11-04 11:29 ` jakub at gcc dot gnu.org
2020-11-04 11:48 ` mick.pearson at wildblue dot net
2020-11-04 11:57 ` mick.pearson at wildblue dot net
2020-11-04 12:03 ` mick.pearson at wildblue dot net
2024-04-09  0:43 ` [Bug c++/97710] diagnostic for invalid pointer-to-member (not function) as template argument with base to derived should be improved 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).