Which Sun C++ compiler has the fix for std::basic_ios::copyfmt() warnings ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • qazmlp

    Which Sun C++ compiler has the fix for std::basic_ios::copyfmt() warnings ?

    When I compile my C++ source code, I am getting hundreds of following
    warning.
    "/opt/SUNWspro/WS6U1/include/CC/Cstd/./ios", line 148: Warning:
    std::basic_ios< char, std::char_trait s<char>>::copyf mt hides the
    function std::ios_base:: copyfmt(const std::ios_base&) .

    I understand that, this is a design flaw in Sun C++ compiler
    implementation.

    Here is the compiler installed in my machine:
    $ pkginfo SPROcpl
    application SPROcpl Sun WorkShop 6 update 1 Compiler C++

    Here is the OS info:
    $ uname -a
    SunOS blrsn62 5.8 Generic_108528-03 sun4u sparc SUNW,Ultra-60


    Does anybody know whether these errors are fixed and in which version
    ?
  • Sven Gohlke

    #2
    Re: Which Sun C++ compiler has the fix for std::basic_ios: :copyfmt() warnings ?

    qazmlp wrote:
    [color=blue]
    > When I compile my C++ source code, I am getting hundreds of following
    > warning.
    > "/opt/SUNWspro/WS6U1/include/CC/Cstd/./ios", line 148: Warning:
    > std::basic_ios< char, std::char_trait s<char>>::copyf mt hides the
    > function std::ios_base:: copyfmt(const std::ios_base&) .
    >
    > I understand that, this is a design flaw in Sun C++ compiler
    > implementation.[/color]

    Sounds like a feature not a bug. The warning simly tolds You, that You have
    two functions with the same signature in different classes. Maybe You have
    a definition like

    template <typename char_type, typename traits_type>
    class ios: public basic_ios<char_ type, traits_type>, public ios_base {...}

    where You could get some problems calling ios.copyfmt(). AFAIK the standard
    don't allow this call, maybe Your C++ compiler allows it.
    --
    Best Regards
    Sven

    Comment

    • qazmlp

      #3
      Re: Which Sun C++ compiler has the fix for std::basic_ios: :copyfmt() warnings ?

      Sven Gohlke <sven@clio.in-berlin.de> wrote in message news:<3312679.g Hj2iyi43c@clio. in-berlin.de>...[color=blue]
      > qazmlp wrote:
      >[color=green]
      > > When I compile my C++ source code, I am getting hundreds of following
      > > warning.
      > > "/opt/SUNWspro/WS6U1/include/CC/Cstd/./ios", line 148: Warning:
      > > std::basic_ios< char, std::char_trait s<char>>::copyf mt hides the
      > > function std::ios_base:: copyfmt(const std::ios_base&) .
      > >
      > > I understand that, this is a design flaw in Sun C++ compiler
      > > implementation.[/color]
      >
      > Sounds like a feature not a bug.[/color]

      This would have been a feature if the error is actually in
      my code. As I know, this is a globally known warning reported
      in Sun Compiler(you can browse for the older postings regarding this).
      That is actually a design bug in C++ headers available in Sun machine.
      That's why I asked whether this is already fixed already and the version
      where this bug is fixed.
      [color=blue]
      > The warning simly tolds You, that You have
      > two functions with the same signature in different classes. Maybe You have
      > a definition like
      >
      > template <typename char_type, typename traits_type>
      > class ios: public basic_ios<char_ type, traits_type>, public ios_base {...}
      >
      > where You could get some problems calling ios.copyfmt(). AFAIK the standard
      > don't allow this call, maybe Your C++ compiler allows it.[/color]

      Thanks for your reply!

      Comment

      Working...