Macro and namespace

Martin v. Loewis martin@mira.isdn.cs.tu-berlin.de
Wed Nov 24 14:11:00 GMT 1999


> At least a better error message should be given: "parse error before `('" is
> quite irritating, and it was so even more in the original context, when
> there were indeed brackets in that line.

Thanks for your bug report. Please understand that this is quite
difficult to do: Once the preprocessor is done, all information is
lost what the original text was.

> Does errno belong to the namespace std? If so, gcc should be able to cope
> with it - by ignoring an isolated "std::"? But that is, at least partially,
> a library problem.

According to the C++ standard, errno is a macro. As such, it is not
scoped. Therefore, writing 'std::errno' is invalid C++.

Regards,
Martin



More information about the Gcc-bugs mailing list