You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by "Martin Sebor (JIRA)" <ji...@apache.org> on 2007/03/02 20:53:50 UTC

[jira] Created: (STDCXX-344) [Sun C++] warnings on std::strstream::rdbuf hiding std::ios::rdbuf

[Sun C++] warnings on std::strstream::rdbuf hiding std::ios::rdbuf
------------------------------------------------------------------

                 Key: STDCXX-344
                 URL: https://issues.apache.org/jira/browse/STDCXX-344
             Project: C++ Standard Library
          Issue Type: Bug
          Components: 27. Input/Output
    Affects Versions: 4.1.2, 4.1.3
         Environment: Sun C++
            Reporter: Martin Sebor
            Priority: Minor


Compiling the header strstream causes Sun C++ to emit warnings like those below:

CC -c -D_RWSTDDEBUG   -mt -D_RWSTD_USE_CONFIG -I/amd/devco/sebor/dev/stdlib/include -I/build/sebor/sunpro-5.8.j8/include  -library=%none -g  +w    /amd/devco/sebor/dev/stdlib/src/strstream.cpp
"/amd/devco/sebor/dev/stdlib/include/strstream", line 188: Warning: std::istrstream::rdbuf hides the function std::ios::rdbuf(std::streambuf *).
"/amd/devco/sebor/dev/stdlib/include/strstream", line 226: Warning: std::ostrstream::rdbuf hides the function std::ios::rdbuf(std::streambuf *).
"/amd/devco/sebor/dev/stdlib/include/strstream", line 266: Warning: std::strstream::rdbuf hides the function std::ios::rdbuf(std::streambuf *).
3 Warning(s) detected.

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


[jira] Commented: (STDCXX-344) [Sun C++] warnings on std::strstream::rdbuf hiding std::ios::rdbuf

Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STDCXX-344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12477423 ] 

Martin Sebor commented on STDCXX-344:
-------------------------------------

This affects not only the library build (as shown above) but also any other translation unit that #includes <sstream> (and uses a specialization of one of the class templates defined there). For instance, here's a warning issued for the example program alg1.cpp:

CC -c -D_RWSTDDEBUG   -mt -D_RWSTD_USE_CONFIG -I/amd/devco/sebor/dev/stdlib/include -I/build/sebor/sunpro-5.8.j8/include -I/amd/devco/sebor/dev/stdlib/examples/include  -library=%none -g  +w   /amd/devco/sebor/dev/stdlib/examples/tutorial/alg1.cpp
"/amd/devco/sebor/dev/stdlib/include/sstream", line 362: Warning: std::ostringstream::rdbuf hides the function std::ios::rdbuf(std::streambuf *).
"/amd/devco/sebor/dev/stdlib/examples/tutorial/alg1.cpp", line 148:     Where: While specializing "std::ostringstream ".
"/amd/devco/sebor/dev/stdlib/examples/tutorial/alg1.cpp", line 148:     Where: Specialized in non-template code.
1 Warning(s) detected.


> [Sun C++] warnings on std::strstream::rdbuf hiding std::ios::rdbuf
> ------------------------------------------------------------------
>
>                 Key: STDCXX-344
>                 URL: https://issues.apache.org/jira/browse/STDCXX-344
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: 27. Input/Output
>    Affects Versions: 4.1.3, 4.1.2
>         Environment: Sun C++
>            Reporter: Martin Sebor
>            Priority: Minor
>
> Compiling the header strstream causes Sun C++ to emit warnings like those below:
> CC -c -D_RWSTDDEBUG   -mt -D_RWSTD_USE_CONFIG -I/amd/devco/sebor/dev/stdlib/include -I/build/sebor/sunpro-5.8.j8/include  -library=%none -g  +w    /amd/devco/sebor/dev/stdlib/src/strstream.cpp
> "/amd/devco/sebor/dev/stdlib/include/strstream", line 188: Warning: std::istrstream::rdbuf hides the function std::ios::rdbuf(std::streambuf *).
> "/amd/devco/sebor/dev/stdlib/include/strstream", line 226: Warning: std::ostrstream::rdbuf hides the function std::ios::rdbuf(std::streambuf *).
> "/amd/devco/sebor/dev/stdlib/include/strstream", line 266: Warning: std::strstream::rdbuf hides the function std::ios::rdbuf(std::streambuf *).
> 3 Warning(s) detected.

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


[jira] Closed: (STDCXX-344) [Sun C++] warnings on std::strstream::rdbuf hiding std::ios::rdbuf

Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STDCXX-344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Sebor closed STDCXX-344.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 4.2

Fixed for 5.7 and beyond by the committed change.

> [Sun C++] warnings on std::strstream::rdbuf hiding std::ios::rdbuf
> ------------------------------------------------------------------
>
>                 Key: STDCXX-344
>                 URL: https://issues.apache.org/jira/browse/STDCXX-344
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: 27. Input/Output
>    Affects Versions: 4.1.2, 4.1.3
>         Environment: Sun C++
>            Reporter: Martin Sebor
>            Assignee: Martin Sebor
>            Priority: Minor
>             Fix For: 4.2
>
>
> Compiling the header strstream causes Sun C++ to emit warnings like those below:
> CC -c -D_RWSTDDEBUG   -mt -D_RWSTD_USE_CONFIG -I/amd/devco/sebor/dev/stdlib/include -I/build/sebor/sunpro-5.8.j8/include  -library=%none -g  +w    /amd/devco/sebor/dev/stdlib/src/strstream.cpp
> "/amd/devco/sebor/dev/stdlib/include/strstream", line 188: Warning: std::istrstream::rdbuf hides the function std::ios::rdbuf(std::streambuf *).
> "/amd/devco/sebor/dev/stdlib/include/strstream", line 226: Warning: std::ostrstream::rdbuf hides the function std::ios::rdbuf(std::streambuf *).
> "/amd/devco/sebor/dev/stdlib/include/strstream", line 266: Warning: std::strstream::rdbuf hides the function std::ios::rdbuf(std::streambuf *).
> 3 Warning(s) detected.

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


[jira] Commented: (STDCXX-344) [Sun C++] warnings on std::strstream::rdbuf hiding std::ios::rdbuf

Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STDCXX-344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12522321 ] 

Martin Sebor commented on STDCXX-344:
-------------------------------------

Based on the Sun C++ 5.9 output with the -errtags option, the flag that silences the warning is -erroff=hidef:

$ CC -c -mt -I/amd/devco/sebor/stdcxx/include -I/build/sebor/stdcxx-suncc-5.9-12d/include  -library=%none -O  -m32 +w -errtags -KPIC  /amd/devco/sebor/stdcxx/src/strstream.cpp
"/amd/devco/sebor/stdcxx/include/strstream", line 195: Warning, hidef: std::istrstream::rdbuf hides the function std::ios::rdbuf(std::streambuf *).
"/amd/devco/sebor/stdcxx/include/strstream", line 233: Warning, hidef: std::ostrstream::rdbuf hides the function std::ios::rdbuf(std::streambuf *).
"/amd/devco/sebor/stdcxx/include/strstream", line 273: Warning, hidef: std::strstream::rdbuf hides the function std::ios::rdbuf(std::streambuf *).
3 Warning(s) detected.
$

With -erroff=hide:

$ CC -c -mt -I/amd/devco/sebor/stdcxx/include -I/build/sebor/stdcxx-suncc-5.9-12d/include  -library=%none -O  -m32 +w -erroff=hidef -KPIC  /amd/devco/sebor/stdcxx/src/strstream.cpp
$


> [Sun C++] warnings on std::strstream::rdbuf hiding std::ios::rdbuf
> ------------------------------------------------------------------
>
>                 Key: STDCXX-344
>                 URL: https://issues.apache.org/jira/browse/STDCXX-344
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: 27. Input/Output
>    Affects Versions: 4.1.2, 4.1.3
>         Environment: Sun C++
>            Reporter: Martin Sebor
>            Assignee: Martin Sebor
>            Priority: Minor
>
> Compiling the header strstream causes Sun C++ to emit warnings like those below:
> CC -c -D_RWSTDDEBUG   -mt -D_RWSTD_USE_CONFIG -I/amd/devco/sebor/dev/stdlib/include -I/build/sebor/sunpro-5.8.j8/include  -library=%none -g  +w    /amd/devco/sebor/dev/stdlib/src/strstream.cpp
> "/amd/devco/sebor/dev/stdlib/include/strstream", line 188: Warning: std::istrstream::rdbuf hides the function std::ios::rdbuf(std::streambuf *).
> "/amd/devco/sebor/dev/stdlib/include/strstream", line 226: Warning: std::ostrstream::rdbuf hides the function std::ios::rdbuf(std::streambuf *).
> "/amd/devco/sebor/dev/stdlib/include/strstream", line 266: Warning: std::strstream::rdbuf hides the function std::ios::rdbuf(std::streambuf *).
> 3 Warning(s) detected.

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


[jira] Commented: (STDCXX-344) [Sun C++] warnings on std::strstream::rdbuf hiding std::ios::rdbuf

Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STDCXX-344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12501030 ] 

Martin Sebor commented on STDCXX-344:
-------------------------------------

Starting with 5.6, Sun C++ also provides the -errtag option to selectively disable individual warnings. See for example this thread for a discussion of the option: http://forum.java.sun.com/thread.jspa?threadID=5163903

> [Sun C++] warnings on std::strstream::rdbuf hiding std::ios::rdbuf
> ------------------------------------------------------------------
>
>                 Key: STDCXX-344
>                 URL: https://issues.apache.org/jira/browse/STDCXX-344
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: 27. Input/Output
>    Affects Versions: 4.1.3, 4.1.2
>         Environment: Sun C++
>            Reporter: Martin Sebor
>            Priority: Minor
>
> Compiling the header strstream causes Sun C++ to emit warnings like those below:
> CC -c -D_RWSTDDEBUG   -mt -D_RWSTD_USE_CONFIG -I/amd/devco/sebor/dev/stdlib/include -I/build/sebor/sunpro-5.8.j8/include  -library=%none -g  +w    /amd/devco/sebor/dev/stdlib/src/strstream.cpp
> "/amd/devco/sebor/dev/stdlib/include/strstream", line 188: Warning: std::istrstream::rdbuf hides the function std::ios::rdbuf(std::streambuf *).
> "/amd/devco/sebor/dev/stdlib/include/strstream", line 226: Warning: std::ostrstream::rdbuf hides the function std::ios::rdbuf(std::streambuf *).
> "/amd/devco/sebor/dev/stdlib/include/strstream", line 266: Warning: std::strstream::rdbuf hides the function std::ios::rdbuf(std::streambuf *).
> 3 Warning(s) detected.

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


[jira] Assigned: (STDCXX-344) [Sun C++] warnings on std::strstream::rdbuf hiding std::ios::rdbuf

Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STDCXX-344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Sebor reassigned STDCXX-344:
-----------------------------------

    Assignee: Martin Sebor

> [Sun C++] warnings on std::strstream::rdbuf hiding std::ios::rdbuf
> ------------------------------------------------------------------
>
>                 Key: STDCXX-344
>                 URL: https://issues.apache.org/jira/browse/STDCXX-344
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: 27. Input/Output
>    Affects Versions: 4.1.2, 4.1.3
>         Environment: Sun C++
>            Reporter: Martin Sebor
>            Assignee: Martin Sebor
>            Priority: Minor
>
> Compiling the header strstream causes Sun C++ to emit warnings like those below:
> CC -c -D_RWSTDDEBUG   -mt -D_RWSTD_USE_CONFIG -I/amd/devco/sebor/dev/stdlib/include -I/build/sebor/sunpro-5.8.j8/include  -library=%none -g  +w    /amd/devco/sebor/dev/stdlib/src/strstream.cpp
> "/amd/devco/sebor/dev/stdlib/include/strstream", line 188: Warning: std::istrstream::rdbuf hides the function std::ios::rdbuf(std::streambuf *).
> "/amd/devco/sebor/dev/stdlib/include/strstream", line 226: Warning: std::ostrstream::rdbuf hides the function std::ios::rdbuf(std::streambuf *).
> "/amd/devco/sebor/dev/stdlib/include/strstream", line 266: Warning: std::strstream::rdbuf hides the function std::ios::rdbuf(std::streambuf *).
> 3 Warning(s) detected.

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


[jira] Commented: (STDCXX-344) [Sun C++] warnings on std::strstream::rdbuf hiding std::ios::rdbuf

Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STDCXX-344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12479776 ] 

Martin Sebor commented on STDCXX-344:
-------------------------------------

Sun handles this by wrapping their iostream templates in a pair of #pragma disable_warn/enable_warn directives. The downside of this approach is that the pragmas silence all warnings, including those we might want to see.

> [Sun C++] warnings on std::strstream::rdbuf hiding std::ios::rdbuf
> ------------------------------------------------------------------
>
>                 Key: STDCXX-344
>                 URL: https://issues.apache.org/jira/browse/STDCXX-344
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: 27. Input/Output
>    Affects Versions: 4.1.3, 4.1.2
>         Environment: Sun C++
>            Reporter: Martin Sebor
>            Priority: Minor
>
> Compiling the header strstream causes Sun C++ to emit warnings like those below:
> CC -c -D_RWSTDDEBUG   -mt -D_RWSTD_USE_CONFIG -I/amd/devco/sebor/dev/stdlib/include -I/build/sebor/sunpro-5.8.j8/include  -library=%none -g  +w    /amd/devco/sebor/dev/stdlib/src/strstream.cpp
> "/amd/devco/sebor/dev/stdlib/include/strstream", line 188: Warning: std::istrstream::rdbuf hides the function std::ios::rdbuf(std::streambuf *).
> "/amd/devco/sebor/dev/stdlib/include/strstream", line 226: Warning: std::ostrstream::rdbuf hides the function std::ios::rdbuf(std::streambuf *).
> "/amd/devco/sebor/dev/stdlib/include/strstream", line 266: Warning: std::strstream::rdbuf hides the function std::ios::rdbuf(std::streambuf *).
> 3 Warning(s) detected.

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