Skip to content
Snippets Groups Projects
Commit 69d69865 authored by Jonathan Wakely's avatar Jonathan Wakely
Browse files

c++: Link extended FP conversion pedwarns to -Wnarrowing [PR111842]

Several users have been confused by the status of these warnings,
which can be misunderstood as "this might not be what you want",
rather than diagnostics required by the C++ standard. Add the text "ISO
C++ does not allow" to make this clear.

Also link them to -Wnarrowing so that they can be disabled or promoted
to errors independently of other pedwarns.

	PR c++/111842
	PR c++/112498

gcc/cp/ChangeLog:

	* call.cc (convert_like_internal): Use OPT_Wnarrowing for
	pedwarns about illformed conversions involving extended
	floating-point types. Clarify that ISO C++ requires these
	diagnostics.

gcc/testsuite/ChangeLog:

	* g++.dg/cpp23/ext-floating16.C: New test.
	* g++.dg/cpp23/ext-floating17.C: New test.
parent 7383cb56
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment