The error message in this case is misleading: $ cat foo.cc #include <unistd.h> namespace foo { typedef long long offset_t; } using namespace std; using namespace foo; int main() { offset_t fpos; } $ $ g++ -c foo.cc foo.cc: In function `int main()': foo.cc:11: error: `offset_t' undeclared (first use this function) foo.cc:11: error: (Each undeclared identifier is reported only once for each function it appears in.) foo.cc:11: error: parse error before `;' token $ Actually 'offset_t' is declared twice, once in the global namespace in Solaris' <sys/types.h> and once in the foo namespace.
Created attachment 8371 [details] test case
Created attachment 8372 [details] stripped down test case
This is a duplicate of a good number of other PRs. I don't have the time right now to find them, though... W.
I could sware I closed this as a dup of bug 100 before. *** This bug has been marked as a duplicate of 100 ***