Hello everyone,
Thanks a lot for all the quick feedback. In the end it was like I kind
of feared this rather silly think of happening to choose the name
'errno' for my particular variable. Changing that was the fix. I don't
actually include <errno.h> directly into the code, but I do include
things like <string.h> and <strings.h>, which presumable do include
<errno.h> indirectly. And yes, these where indeed not in the example
code I sent. All in all a good learning experience. Thanks!
Greetings, Jakob
On 02/20/2011 03:51 PM, Ian Lance Taylor wrote:
Axel Freyn<axel-freyn@xxxxxx> writes:
Nevertheless, I haven't checked what the standards of C++ and C++0x say
about "errno", but probably the compiler is right...
The standard says that "errno" is a macro defined in<errno.h>, a macro
"which expands to a modifiable lvalue." If you #include<errno.h> it's
unwise to use errno as an identifier name.
Ian