stdcxx-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Sebor (JIRA)" <j...@apache.org>
Subject [jira] Commented: (STDCXX-936) [Sun C++] fails to #include standard headers more than once
Date Tue, 20 May 2008 21:22:55 GMT

    [ https://issues.apache.org/jira/browse/STDCXX-936?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12598479#action_12598479
] 

Martin Sebor commented on STDCXX-936:
-------------------------------------

Reported as bug [6688168|http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6688168]. Steve
Clamage moved it to RFE [6703971|http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6703971]

> [Sun C++] fails to #include standard headers more than once
> -----------------------------------------------------------
>
>                 Key: STDCXX-936
>                 URL: https://issues.apache.org/jira/browse/STDCXX-936
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: External
>         Environment: Sun C++ 5.9 SunOS_sparc Patch 124863-01 2007/07/25
>            Reporter: Martin Sebor
>
> 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.
> {noformat}
> $ 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.
> {noformat}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message