https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112808
--- Comment #5 from helge at penne dot no ---
Thank you for doing this. I think this will have a big impact.
I do hope that when this has been in use for a while and users have fixed most
of the bugs that it will reveal, then perhaps you can
: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: helge at penne dot no
Target Milestone: ---
In my experience, the assertions enabled by _GLIBCXX_ASSERTIONS are incredidbly
important and effective, but sadly nowhere
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82745
--- Comment #11 from helge at penne dot no ---
(In reply to Jonathan Wakely from comment #10)
> This is still the same known problem already described in PR 80472 and PR
> 58876.
It is the same root cause, yes. PR 58876 is about a dif
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82745
--- Comment #9 from helge at penne dot no ---
I've tried compiling with -Wsystem-headers. This results in a significant
number of warnings inside libstdc++ itself, due to conversions resulting in
potential sign changes and/or loss of prec
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82745
--- Comment #8 from helge at penne dot no ---
(In reply to Jonathan Wakely from comment #7)
> -Wsystem-headers is needed to get the warnings when the conversion happens
> in code inside a system-header (which is the case for lots of st
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82745
--- Comment #6 from helge at penne dot no ---
I'm sorry if I confused you by using the wrong terminology here. My bad.
We're now getting to the real issue, and that's great.
You're right that C++ by default allows impl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82745
--- Comment #4 from helge at penne dot no ---
(In reply to Jonathan Wakely from comment #2)
> Narrowing conversions only cause a diagnostic in braced-init-list, not in
> other contexts. This is how C++ has worked since day one.
I must admi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82745
helge at penne dot no changed:
What|Removed |Added
Summary|Fails to warn on narrowing |Fails to warn on narrowing
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: helge at penne dot no
Target Milestone: ---
Created attachment 42486
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42486&action=edit
Example code
I may possibly have found a b