public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug sanitizer/71962] error: ‘((& x) != 0u)’ is not a constant expression
       [not found] <bug-71962-4@http.gcc.gnu.org/bugzilla/>
@ 2020-03-30 21:54 ` herring at lanl dot gov
  2022-12-31 21:44 ` pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 4+ messages in thread
From: herring at lanl dot gov @ 2020-03-30 21:54 UTC (permalink / raw)
  To: gcc-bugs

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

S. Davis Herring <herring at lanl dot gov> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |herring at lanl dot gov

--- Comment #9 from S. Davis Herring <herring at lanl dot gov> ---
Another very similar failure (let me know if you want a separate bug for it):

  inline constexpr int x=0,y=0;  // -std=c++17
  static_assert(&x!=&y);  // error: '((& x) != (& y))' is not a constant
expression

No failure without the 'inline'.

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

* [Bug sanitizer/71962] error: ‘((& x) != 0u)’ is not a constant expression
       [not found] <bug-71962-4@http.gcc.gnu.org/bugzilla/>
  2020-03-30 21:54 ` [Bug sanitizer/71962] error: ‘((& x) != 0u)’ is not a constant expression herring at lanl dot gov
@ 2022-12-31 21:44 ` pinskia at gcc dot gnu.org
  2023-06-30  4:32 ` pinskia at gcc dot gnu.org
  2024-03-25 15:40 ` barry.revzin at gmail dot com
  3 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-12-31 21:44 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |trippels at gcc dot gnu.org

--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 67762 has been marked as a duplicate of this bug. ***

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

* [Bug sanitizer/71962] error: ‘((& x) != 0u)’ is not a constant expression
       [not found] <bug-71962-4@http.gcc.gnu.org/bugzilla/>
  2020-03-30 21:54 ` [Bug sanitizer/71962] error: ‘((& x) != 0u)’ is not a constant expression herring at lanl dot gov
  2022-12-31 21:44 ` pinskia at gcc dot gnu.org
@ 2023-06-30  4:32 ` pinskia at gcc dot gnu.org
  2024-03-25 15:40 ` barry.revzin at gmail dot com
  3 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-30  4:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 110493 has been marked as a duplicate of this bug. ***

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

* [Bug sanitizer/71962] error: ‘((& x) != 0u)’ is not a constant expression
       [not found] <bug-71962-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2023-06-30  4:32 ` pinskia at gcc dot gnu.org
@ 2024-03-25 15:40 ` barry.revzin at gmail dot com
  3 siblings, 0 replies; 4+ messages in thread
From: barry.revzin at gmail dot com @ 2024-03-25 15:40 UTC (permalink / raw)
  To: gcc-bugs

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

Barry Revzin <barry.revzin at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |barry.revzin at gmail dot com

--- Comment #12 from Barry Revzin <barry.revzin at gmail dot com> ---
Similar failure:

struct A {
    void f();
};

int main() {
    constexpr auto pmf = &A::f;
    static_assert(pmf != nullptr); // error with UBSAN only
}

This surfaces from attempting to implement function_ref
(https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p0792r14.html) which
has a constructor that takes the callable as a non-type template parameter and
static_asserts that it's not a null pointer.

Which apparently doesn't work with UBSAN.

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

end of thread, other threads:[~2024-03-25 15:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-71962-4@http.gcc.gnu.org/bugzilla/>
2020-03-30 21:54 ` [Bug sanitizer/71962] error: ‘((& x) != 0u)’ is not a constant expression herring at lanl dot gov
2022-12-31 21:44 ` pinskia at gcc dot gnu.org
2023-06-30  4:32 ` pinskia at gcc dot gnu.org
2024-03-25 15:40 ` barry.revzin at gmail dot com

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