https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78826
--- Comment #6 from Andrew Pinski ---
Here is another one where GCC6- used to reject and in GCC7+ accepts (note this
looks to be only valid C++11 anyways):
struct vec { vec () = default; };
void ggg () {
goto out;
vec odsd;
out: ;
}
CU
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78826
Jonathan Wakely changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78826
--- Comment #5 from Jason Merrill ---
(In reply to Jonathan Wakely from comment #4)
> Jason, do you see any advantage to making this a pedwarn for -std=c++98
That seems to make sense, given that other compilers diagnose it.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78826
Jonathan Wakely changed:
What|Removed |Added
CC||jason at gcc dot gnu.org
--- Comment #
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78826
--- Comment #3 from Krzysztof Laskowski ---
(In reply to Jonathan Wakely from comment #2)
> I assume GCC 4.5 stopped diagnosing it due to the revised specification
> which only cares about trivial constructor or trivial destructor, not
> PODness.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78826
--- Comment #2 from Jonathan Wakely ---
GCC 4.4.7 gives an error:
pod.cc: In function ‘void should_not_compile()’:
pod.cc:6: error: jump to label ‘label’
pod.cc:4: error: from here
pod.cc:5: error: enters scope of non-POD ‘non_pod_in_cpp03 x
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78826
--- Comment #1 from Andrew Pinski ---
Note there might be a rule about non trivial constructors in there too.