Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
Sun C++ 5.9 SunOS_sparc Patch 124863-01 2007/07/25
-
Incorrect Behavior
Description
The program below fails to compile with Sun C++. The compiler assumes <limits> refers to its own header rather than the one provided by the user in the same directory as the program source code, t.cpp.
$ cat -n limits && cat -n t.cpp && CC -c -I. -library=%none -V t.cpp 1 // limits 2 static int foo = 0; 1 // t.cpp 2 #include <limits> 3 #define foo bar 4 #include <limits> 5 #undef foo 6 7 int main () 8 { 9 return foo + bar; 10 } CC: Sun C++ 5.9 SunOS_sparc Patch 124863-01 2007/07/25 ccfe: Sun C++ 5.9 SunOS_sparc Patch 124863-01 2007/07/25 "t.cpp", line 9: Error: bar is not defined. 1 Error(s) detected.
Attachments
Issue Links
- is depended upon by
-
STDCXX-937 [Sun C++] unsats on std::numeric_limits<double> data members
- Closed