public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/18556] New: iostream header pollutes global namespace
@ 2015-06-18 9:16 demelier.david at gmail dot com
2015-06-18 9:39 ` [Bug libc/18556] " schwab@linux-m68k.org
2015-06-18 10:01 ` [Bug admin/18556] " demelier.david at gmail dot com
0 siblings, 2 replies; 3+ messages in thread
From: demelier.david at gmail dot com @ 2015-06-18 9:16 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=18556
Bug ID: 18556
Summary: iostream header pollutes global namespace
Product: glibc
Version: unspecified
Status: NEW
Severity: critical
Priority: P2
Component: libc
Assignee: unassigned at sourceware dot org
Reporter: demelier.david at gmail dot com
CC: drepper.fsp at gmail dot com
Target Milestone: ---
I'm unable to compile the following code that should just compile fine:
#include <iostream>
struct Version {
int major;
Version(int vmajor)
: major(vmajor)
{
}
};
int main()
{
return 0;
}
See the error:
In file included from /usr/include/i386-linux-gnu/sys/types.h:222:0,
from /usr/include/stdlib.h:314,
from /usr/include/c++/4.9/cstdlib:72,
from /usr/include/c++/4.9/ext/string_conversions.h:41,
from /usr/include/c++/4.9/bits/basic_string.h:2850,
from /usr/include/c++/4.9/string:52,
from /usr/include/c++/4.9/bits/locale_classes.h:40,
from /usr/include/c++/4.9/bits/ios_base.h:41,
from /usr/include/c++/4.9/ios:42,
from /usr/include/c++/4.9/ostream:38,
from /usr/include/c++/4.9/iostream:39,
from prog.cpp:1:
prog.cpp: In constructor 'Version::Version(int)':
prog.cpp:7:5: error: class 'Version' does not have any field named
'gnu_dev_major'
: major(vmajor)
This happens because glibc authors added their own additions to the C++
standard which breaks it.
Fix (choose one):
a. Remove these stupid macros
b. Stop including your own header files in standard C++ headers
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug libc/18556] iostream header pollutes global namespace
2015-06-18 9:16 [Bug libc/18556] New: iostream header pollutes global namespace demelier.david at gmail dot com
@ 2015-06-18 9:39 ` schwab@linux-m68k.org
2015-06-18 10:01 ` [Bug admin/18556] " demelier.david at gmail dot com
1 sibling, 0 replies; 3+ messages in thread
From: schwab@linux-m68k.org @ 2015-06-18 9:39 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=18556
Andreas Schwab <schwab@linux-m68k.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |INVALID
--- Comment #1 from Andreas Schwab <schwab@linux-m68k.org> ---
Worksforme. And <iostream> is not part of glibc.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug admin/18556] iostream header pollutes global namespace
2015-06-18 9:16 [Bug libc/18556] New: iostream header pollutes global namespace demelier.david at gmail dot com
2015-06-18 9:39 ` [Bug libc/18556] " schwab@linux-m68k.org
@ 2015-06-18 10:01 ` demelier.david at gmail dot com
1 sibling, 0 replies; 3+ messages in thread
From: demelier.david at gmail dot com @ 2015-06-18 10:01 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=18556
demelier.david at gmail dot com <demelier.david at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |carlos at redhat dot com,
| |roland at gnu dot org
Component|libc |admin
--- Comment #2 from demelier.david at gmail dot com <demelier.david at gmail dot com> ---
Oh yeah I need to file the bug to libstdc++, I thought both C library and C++
library were developed there.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-06-18 10:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-18 9:16 [Bug libc/18556] New: iostream header pollutes global namespace demelier.david at gmail dot com
2015-06-18 9:39 ` [Bug libc/18556] " schwab@linux-m68k.org
2015-06-18 10:01 ` [Bug admin/18556] " demelier.david at gmail dot com
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).