[Bug c++/120005] TU-local exposure error in constexpr function

2025-04-29 Thread nshead at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120005 --- Comment #4 from Nathaniel Shead --- But as Andrew says, you can workaround the issue by declaring it 'inline' to prevent it from having internal linkage. This will also avoid any issues with accidental ODR usages from later maintenance.

[Bug c++/120005] TU-local exposure error in constexpr function

2025-04-29 Thread nshead at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120005 Nathaniel Shead changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug c++/120005] TU-local exposure error in constexpr function

2025-04-29 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120005 --- Comment #2 from Andrew Pinski --- I think even comment #0 is correct error message. constexpr causes the linkage to be local. I think you need inline here to cause the linkage to be vague.

[Bug c++/120005] TU-local exposure error in constexpr function

2025-04-29 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120005 --- Comment #1 from Andrew Pinski --- >I'm additionally seeing errors in a module which internally uses some boost >containers. That one looks like a correct error. https://github.com/boostorg/container/commit/a4c4c3b3191ece1396e0a863e636346