public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/17882] New: Using -O3 -Wformat=2 causes spurious warnings on iostream
@ 2004-10-07 16:34 jlawson-gcc at bovine dot net
2004-10-07 16:36 ` [Bug libstdc++/17882] " pinskia at gcc dot gnu dot org
2004-10-07 16:38 ` pinskia at gcc dot gnu dot org
0 siblings, 2 replies; 3+ messages in thread
From: jlawson-gcc at bovine dot net @ 2004-10-07 16:34 UTC (permalink / raw)
To: gcc-bugs
Using -O2 or less does not cause this error. Using Linux Redhat ES 2.1 and 3
with this version of gcc:
gcc (GCC) 3.2.1 20021125 (Red Hat Linux 8.0 3.2.1-1)
Copyright (C) 2002 Free Software Foundation, Inc.
and with libstdc++-devel-3.2.3-34
$ cat > stdheaderbug.cpp
#include <iostream>
int main() {
std::cout << 1;
return 0;
}
$ g++ -O3 -Wformat=2 -fmessage-length=0 -Werror stdheaderbug.cpp
cc1plus: warnings being treated as errors
/usr/include/c++/3.2.1/i386-redhat-linux/bits/c++locale.h: In function `int
std::__convert_from_v(char*, int, const char*, _Tv, __locale_struct* const&,
int) [with _Tv = long unsigned int]':
/usr/include/c++/3.2.1/bits/locale_facets.tcc:701: instantiated from `_OutIter
std::num_put<_CharT, _OutIter>::_M_convert_int(_OutIter, std::ios_base&, _CharT,
char, char, _ValueT) const [with _ValueT = long unsigned int, _CharT = char,
_OutIter = std::ostreambuf_iterator<char, std::char_traits<char> >]'
/usr/include/c++/3.2.1/bits/locale_facets.tcc:895: instantiated from `_OutIter
std::num_put<_CharT, _OutIter>::do_put(_OutIter, std::ios_base&, _CharT, long
unsigned int) const [with _CharT = char, _OutIter =
std::ostreambuf_iterator<char, std::char_traits<char> >]'
/usr/include/c++/3.2.1/bits/locale_facets.h:745: instantiated from `_OutIter
std::num_put<_CharT, _OutIter>::put(_OutIter, std::ios_base&, _CharT, long
unsigned int) const [with _CharT = char, _OutIter =
std::ostreambuf_iterator<char, std::char_traits<char> >]'
/usr/include/c++/3.2.1/bits/ostream.tcc:215: instantiated from
`std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT,
_Traits>::operator<<(long unsigned int) [with _CharT = char, _Traits =
std::char_traits<char>]'
/usr/include/c++/3.2.1/ostream:122: instantiated from
`std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT,
_Traits>::operator<<(int) [with _CharT = char, _Traits = std::char_traits<char>]'
stdheaderbug.cpp:3: instantiated from here
/usr/include/c++/3.2.1/i386-redhat-linux/bits/c++locale.h:76: warning: format
not a string literal, argument types not checked
/usr/include/c++/3.2.1/i386-redhat-linux/bits/c++locale.h:76: warning: format
not a string literal, argument types not checked
/usr/include/c++/3.2.1/i386-redhat-linux/bits/c++locale.h:78: warning: format
not a string literal, argument types not checked
/usr/include/c++/3.2.1/i386-redhat-linux/bits/c++locale.h:78: warning: format
not a string literal, argument types not checked
/usr/include/c++/3.2.1/i386-redhat-linux/bits/c++locale.h: In function `int
std::__convert_from_v(char*, int, const char*, _Tv, __locale_struct* const&,
int) [with _Tv = long int]':
/usr/include/c++/3.2.1/bits/locale_facets.tcc:701: instantiated from `_OutIter
std::num_put<_CharT, _OutIter>::_M_convert_int(_OutIter, std::ios_base&, _CharT,
char, char, _ValueT) const [with _ValueT = long int, _CharT = char, _OutIter =
std::ostreambuf_iterator<char, std::char_traits<char> >]'
/usr/include/c++/3.2.1/bits/locale_facets.tcc:888: instantiated from `_OutIter
std::num_put<_CharT, _OutIter>::do_put(_OutIter, std::ios_base&, _CharT, long
int) const [with _CharT = char, _OutIter = std::ostreambuf_iterator<char,
std::char_traits<char> >]'
/usr/include/c++/3.2.1/bits/locale_facets.h:740: instantiated from `_OutIter
std::num_put<_CharT, _OutIter>::put(_OutIter, std::ios_base&, _CharT, long int)
const [with _CharT = char, _OutIter = std::ostreambuf_iterator<char,
std::char_traits<char> >]'
/usr/include/c++/3.2.1/bits/ostream.tcc:188: instantiated from
`std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT,
_Traits>::operator<<(long int) [with _CharT = char, _Traits =
std::char_traits<char>]'
/usr/include/c++/3.2.1/ostream:125: instantiated from
`std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT,
_Traits>::operator<<(int) [with _CharT = char, _Traits = std::char_traits<char>]'
stdheaderbug.cpp:3: instantiated from here
/usr/include/c++/3.2.1/i386-redhat-linux/bits/c++locale.h:76: warning: format
not a string literal, argument types not checked
/usr/include/c++/3.2.1/i386-redhat-linux/bits/c++locale.h:76: warning: format
not a string literal, argument types not checked
/usr/include/c++/3.2.1/i386-redhat-linux/bits/c++locale.h:78: warning: format
not a string literal, argument types not checked
/usr/include/c++/3.2.1/i386-redhat-linux/bits/c++locale.h:78: warning: format
not a string literal, argument types not checked
$
--
Summary: Using -O3 -Wformat=2 causes spurious warnings on
iostream
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jlawson-gcc at bovine dot net
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17882
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug libstdc++/17882] Using -O3 -Wformat=2 causes spurious warnings on iostream
2004-10-07 16:34 [Bug libstdc++/17882] New: Using -O3 -Wformat=2 causes spurious warnings on iostream jlawson-gcc at bovine dot net
@ 2004-10-07 16:36 ` pinskia at gcc dot gnu dot org
2004-10-07 16:38 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-07 16:36 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Version|unknown |3.2.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17882
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug libstdc++/17882] Using -O3 -Wformat=2 causes spurious warnings on iostream
2004-10-07 16:34 [Bug libstdc++/17882] New: Using -O3 -Wformat=2 causes spurious warnings on iostream jlawson-gcc at bovine dot net
2004-10-07 16:36 ` [Bug libstdc++/17882] " pinskia at gcc dot gnu dot org
@ 2004-10-07 16:38 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-07 16:38 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-07 16:38 -------
Fixed since 3.3.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |3.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17882
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-10-07 16:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-07 16:34 [Bug libstdc++/17882] New: Using -O3 -Wformat=2 causes spurious warnings on iostream jlawson-gcc at bovine dot net
2004-10-07 16:36 ` [Bug libstdc++/17882] " pinskia at gcc dot gnu dot org
2004-10-07 16:38 ` pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).