public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/19373] New: Including STL headers in a namespace doesn't compile
@ 2005-01-11 14:19 JurgenvonOerthel at hotmail dot com
  2005-01-11 14:20 ` [Bug c++/19373] " pinskia at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: JurgenvonOerthel at hotmail dot com @ 2005-01-11 14:19 UTC (permalink / raw)
  To: gcc-bugs

The following code doesn't compile:

namespace foo {
#include <vector>
}

int main (void) {
  return 0;
}

Many errors follow, the first one looks like:

In file included 
from /sys/cadappl_linuxi386_borealis/gcc/3.3.3/include/c++/3.3.3/cstring:49,
                 
from /sys/cadappl_linuxi386_borealis/gcc/3.3.3/include/c++/3.3.3/bits/stl_algob
ase.h:65,
                 
from /sys/cadappl_linuxi386_borealis/gcc/3.3.3/include/c++/3.3.3/vector:67,
                 from map_test.cc:2:
/sys/cadappl_linuxi386_borealis/gcc/3.3.3/include/c++/3.3.3/cstddef:52: error: 
`
   ptrdiff_t' not declared
/sys/cadappl_linuxi386_borealis/gcc/3.3.3/include/c++/3.3.3/cstddef:53: error: 
`
   size_t' not declared

-- 
           Summary: Including STL headers in a namespace doesn't compile
           Product: gcc
           Version: 3.3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: JurgenvonOerthel at hotmail dot com
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19373


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/19373] Including STL headers in a namespace doesn't compile
  2005-01-11 14:19 [Bug c++/19373] New: Including STL headers in a namespace doesn't compile JurgenvonOerthel at hotmail dot com
@ 2005-01-11 14:20 ` pinskia at gcc dot gnu dot org
  2005-01-11 19:48 ` gdr at integrable-solutions dot net
  2005-01-11 22:49 ` bkoz at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-11 14:20 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-01-11 14:20 -------
Yes this is invalid, sorry, you cannot do this.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19373


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/19373] Including STL headers in a namespace doesn't compile
  2005-01-11 14:19 [Bug c++/19373] New: Including STL headers in a namespace doesn't compile JurgenvonOerthel at hotmail dot com
  2005-01-11 14:20 ` [Bug c++/19373] " pinskia at gcc dot gnu dot org
@ 2005-01-11 19:48 ` gdr at integrable-solutions dot net
  2005-01-11 22:49 ` bkoz at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: gdr at integrable-solutions dot net @ 2005-01-11 19:48 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at integrable-solutions dot net  2005-01-11 19:48 -------
Subject: Re:  New: Including STL headers in a namespace doesn't compile

"JurgenvonOerthel at hotmail dot com" <gcc-bugzilla@gcc.gnu.org> writes:

| The following code doesn't compile:

Then, don't do it.

-- Gaby


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19373


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/19373] Including STL headers in a namespace doesn't compile
  2005-01-11 14:19 [Bug c++/19373] New: Including STL headers in a namespace doesn't compile JurgenvonOerthel at hotmail dot com
  2005-01-11 14:20 ` [Bug c++/19373] " pinskia at gcc dot gnu dot org
  2005-01-11 19:48 ` gdr at integrable-solutions dot net
@ 2005-01-11 22:49 ` bkoz at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: bkoz at gcc dot gnu dot org @ 2005-01-11 22:49 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bkoz at gcc dot gnu dot org  2005-01-11 22:49 -------
Gaby, your comment is funny! Made me laugh, since I just got out of my cast.

Just for reference, this is invalid because it would invalidate 

17.4.1.1 - Library contents 

requires std or std:: namespaces for library components

17.4.3.1.4 - Types [lib.extern.types]

ie std::size_t and ::size_t could no longer be equivalent.

It would also change standard-defined external linkage

17.4.3.1.3 - External linkage

-benjamin

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19373


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-01-11 22:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-11 14:19 [Bug c++/19373] New: Including STL headers in a namespace doesn't compile JurgenvonOerthel at hotmail dot com
2005-01-11 14:20 ` [Bug c++/19373] " pinskia at gcc dot gnu dot org
2005-01-11 19:48 ` gdr at integrable-solutions dot net
2005-01-11 22:49 ` bkoz 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).