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

Q

qazmlp

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_traits<char>>::copyfmt 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
?
 
S

Sven Gohlke

qazmlp said:
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_traits<char>>::copyfmt hides the
function std::ios_base::copyfmt(const std::ios_base&).

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

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.
 
Q

qazmlp

Sven Gohlke said:
Sounds like a feature not a bug.

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.
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.

Thanks for your reply!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,705
Latest member
Stefkari24

Latest Threads

Top