It's an error. The C standard is organized even worse than the C++ standard, but 6.5.4p3 says, "Conversions that involve pointers, other than where permitted by the constraints of 188.8.131.52, shall be specified by means of an explicit cast."
Originally Posted by laserlight
And said section permits, paraphrased:
1) Conversion between arithmetic types.
2) Conversion between compatible structures and unions.
3) Conversion between pointers to compatible types, where cv qualification is not lost.
4) Conversion between void* and other pointer types, where cv qualification is not lost.
5) Conversion from a null pointer constant to a pointer.
6) Conversion from a pointer to _Bool.
Hmm ... what mode (C or C++) and warning level? There should be at least a warning. (There's an awful lot of really, really bad legacy C code out there, which is why most compilers accept the code. But they should still warn.)
Originally Posted by Raigne
All warnings are default, and build is debug, and C++
I think one bottom line thing to say that neither C nor C++ nor most non-interpreted languages perceive a single quote the same as a double quote the way as an interpreted language does.
That is cool. But in C++ that is not cool at all. Luckily your compiler will notify you of the difference when you make a "boo boo."
document.alert('Holy smokes! You are being annoyed by a pop-up message!');