Chris said:
I have asked this question in several places and the majority have said
they do not have a copy of the language standard for c or C++
The majority I have met or worked with do not.
Many have the K&R2 or the BS books but as far as most are concerned the
compiler manuals are more important than the standard.
That's probably at least in part because you tend to get the compiler
manuals for free (the popular compilers and IDEs I've used install the
manual at the same time as the compiler, so it is right there for me)
whereas you have to go out of your way and spend money to get the
language standard.
The first C++ compiler I used professionally was MSVC++6. I anticipated
that it wouldn't be the only one. I knew that few if any compilers
implemented the language perfectly. Each would have its own gaps in
coverage and non-standard behaviours. I knew that when I started to use
a different compiler, there would be some things that worked a
particular way in MSVC++6 that were different in the new compiler. But
how to know in advance (highly preferable to painful learning through
trial and error) what those things were going to be? MSVC++6 does not
come with a list called "things we do differently from g++" and g++
does not come with a list called "things we do differently from
MSVC++6". However, both do come with their own list called "things we
do differently from the formal C++ language specification". The lists
are different for each of course. So the key is to know the formal C++
language specification [*] so you have the right context to read the
"things we differently" list provided by every compiler. By doing that
I felt that, instead of being a potential big upheaval, changing
compiler as often as needed could be a non-event.
Gavin Deane
[*] For which the only definitive source is the standard, and at $18 it
seemed like a very good deal for a definitive source.