On 10/11/15 11:56, David Brown wrote:
That's why it's good that there are lots of people thinking together on
these specifications, and not just one person! Or perhaps we should all
switch to using ARM chips...
The people who think and know a lot about these things are the members of the
C/C++ standards committee. After this long discussion, I haven't seen anything
new that is not mentioned already in the FAQ and links therein:
https://gcc.gnu.org/wiki/FAQ#undefinedbut
and specially the last sentence is still true as ever:
"Perhaps we could, but not under the current Standard. [...] But the C Standard
is under revision: perhaps, if this is important enough to you, you can
convince the committee [...]. Good luck."
Of course, GCC should warn as much as possible about UB and behave as
predictably and user-friendly as possible. Yet, many things in GCC work the way
they work because nobody had the right approach, time or perseverance to fix
them. Some of them may be too hard to "fix" or just create more problems. The
way to figure that out is not by "debating" in a mailing list. It is by
stretching your fingers and trying to fix them
(https://gcc.gnu.org/wiki/GettingStarted#Basics:_Contributing_to_GCC_in_10_easy_steps).
Unfortunately, I have learned the hard way myself that until you try to
actually fix (fix as in implement something that can be added to mainline GCC
and it is not a toy research project or pure mailing list speculation) those
issues, you cannot really appreciate what needs to be done to fix them. Case in
point: https://gcc.gnu.org/PR18501
Cheers,
Manuel.