public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/8448: Regression from gcc 2.96 concerning nested namespaces
@ 2002-11-05 11:26 Wolfgang Bangerth
  0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Bangerth @ 2002-11-05 11:26 UTC (permalink / raw)
  To: paolo; +Cc: gcc-prs

The following reply was made to PR c++/8448; it has been noted by GNATS.

From: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
To: gcc-bugs@gcc.gnu.org
Cc: Roberto Bagnara <bagnara@cs.unipr.it>, <gcc-gnats@gcc.gnu.org>
Subject: Re: c++/8448: Regression from gcc 2.96 concerning nested namespaces
Date: Tue, 5 Nov 2002 13:27:47 -0600 (CST)

 > Thanks everyone: I have studied the issue and now I understand what's
 > going on and why.  I only wonder if g++ is not being a bit too pedantic
 > (without being asked to do so) on this rather controversial issue.
 
 This is just a matter what the standard prescribes. I guess you would be 
 surprised if some code compiled with one compiler and not with another one 
 because the one decided to look at more symbols from other namespace than 
 another. The usual question then also is how to deal with newly arising 
 ambiguities between different symbols in different namespaces.
 
 I guess the most proper way to get a change is to lobby the C++ standards 
 committee to review the matter and come up with a solution that may then 
 be implemented by all compiler vendors.
 
 Regards
   Wolfgang
 
 -------------------------------------------------------------------------
 Wolfgang Bangerth              email:           bangerth@ticam.utexas.edu
                                www: http://www.ticam.utexas.edu/~bangerth
 
 


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

* Re: c++/8448: Regression from gcc 2.96 concerning nested namespaces
@ 2002-11-05 11:46 Martin Sebor
  0 siblings, 0 replies; 6+ messages in thread
From: Martin Sebor @ 2002-11-05 11:46 UTC (permalink / raw)
  To: paolo; +Cc: gcc-prs

The following reply was made to PR c++/8448; it has been noted by GNATS.

From: Martin Sebor <sebor@roguewave.com>
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: Re: c++/8448: Regression from gcc 2.96 concerning nested namespaces
Date: Tue, 05 Nov 2002 12:43:19 -0700

 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8448
 
 
  > I guess the most proper way to get a change is to lobby the C++
  > standards committee to review the matter and come up with a solution
  > that may then be implemented by all compiler vendors.
 
 This issue is already being discussed. See
 
      http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-active.html#226
 
 Regards
 Martin
 


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

* Re: c++/8448: Regression from gcc 2.96 concerning nested namespaces
@ 2002-11-05  9:56 Roberto Bagnara
  0 siblings, 0 replies; 6+ messages in thread
From: Roberto Bagnara @ 2002-11-05  9:56 UTC (permalink / raw)
  To: paolo; +Cc: gcc-prs

The following reply was made to PR c++/8448; it has been noted by GNATS.

From: Roberto Bagnara <bagnara@cs.unipr.it>
To: bagnara@cs.unipr.it, gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org,
   gcc-bugs@gcc.gnu.org, paolo@gcc.gnu.org
Cc:  
Subject: Re: c++/8448: Regression from gcc 2.96 concerning nested namespaces
Date: Tue, 05 Nov 2002 18:46:43 +0100

 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8448
 
 Thanks everyone: I have studied the issue and now I understand what's
 going on and why.  I only wonder if g++ is not being a bit too pedantic
 (without being asked to do so) on this rather controversial issue.
 All the best
 
      Roberto
 
 --
 Prof. Roberto Bagnara
 Computer Science Group
 Department of Mathematics, University of Parma, Italy
 http://www.cs.unipr.it/~bagnara/
 mailto:bagnara@cs.unipr.it
 


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

* Re: c++/8448: Regression from gcc 2.96 concerning nested namespaces
@ 2002-11-04  8:01 bangerth
  0 siblings, 0 replies; 6+ messages in thread
From: bangerth @ 2002-11-04  8:01 UTC (permalink / raw)
  To: bagnara, gcc-bugs, gcc-prs, paolo

Synopsis: Regression from gcc 2.96 concerning nested namespaces

State-Changed-From-To: feedback->closed
State-Changed-By: bangerth
State-Changed-When: Mon Nov  4 08:01:33 2002
State-Changed-Why:
    Paolo is right. Your op<< is in another namespace, and the
    using directive only makes it visible in the global namespace,
    but not where it is needed: in std::copy or std::ostream_iterator.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8448


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

* Re: c++/8448: Regression from gcc 2.96 concerning nested namespaces
@ 2002-11-04  7:43 paolo
  0 siblings, 0 replies; 6+ messages in thread
From: paolo @ 2002-11-04  7:43 UTC (permalink / raw)
  To: bagnara, gcc-bugs, gcc-prs, nobody, paolo

Synopsis: Regression from gcc 2.96 concerning nested namespaces

Responsible-Changed-From-To: unassigned->paolo
Responsible-Changed-By: paolo
Responsible-Changed-When: Mon Nov  4 07:43:26 2002
Responsible-Changed-Why:
    .
State-Changed-From-To: open->feedback
State-Changed-By: paolo
State-Changed-When: Mon Nov  4 07:43:26 2002
State-Changed-Why:
    Ciao Roberto. It doesn't compile for me with Comeau in
    *strict* mode (i.e., --strict switch, -Xc for Intel), just
    tested with the online compiler.
    First blush, seems to me very similar to c++/8279
    (not a bug) ...

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8448


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

* c++/8448: Regression from gcc 2.96 concerning nested namespaces
@ 2002-11-04  6:56 bagnara
  0 siblings, 0 replies; 6+ messages in thread
From: bagnara @ 2002-11-04  6:56 UTC (permalink / raw)
  To: gcc-gnats


>Number:         8448
>Category:       c++
>Synopsis:       Regression from gcc 2.96 concerning nested namespaces
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 04 06:56:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Roberto Bagnara
>Release:        3.2
>Organization:
>Environment:
RedHat 8.0
Linux zoltan.unisuv.it 2.4.19 #31 Mon Oct 28 14:17:54 CET 2002 i686 athlon i386
GNU/Linux
>Description:
The attached program shows a problem with nested namespaces.
An output operator is not "seen" if it is within a nested
namespace.  The attached program compiles fine with gcc
2.96 20000731 (Red Hat Linux 7.2 2.96-108.7.2),
with Comeau C/C++ 4.3.0.1, and with Intel's icc 6.0.1.
It does not compile, however, with gcc 3.2.

(I apologize for referring to gcc 2.96, a non-release,
but I do not have any other version of gcc handy.)
>How-To-Repeat:
$g++ -v
Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.2/specs
Configured with: ../gcc-3.2/configure --prefix=/usr/local
Thread model: posix
gcc version 3.2
$ g++ -c -W -Wall gccbug.cc
/usr/local/include/c++/3.2/bits/stream_iterator.h: In member function 
   `std::ostream_iterator<_Tp, _CharT, _Traits>& std::ostream_iterator<_Tp, 
   _CharT, _Traits>::operator=(const _Tp&) [with _Tp = 
   Parma_Polyhedra_Library::Constraint, _CharT = char, _Traits = 
   std::char_traits<char>]':
/usr/local/include/c++/3.2/bits/stl_algobase.h:228:   instantiated from `_OutputIter std::__copy(_InputIter, _InputIter, _OutputIter, std::input_iterator_tag) [with _InputIter = Parma_Polyhedra_Library::ConSys::const_iterator, _OutputIter = std::ostream_iterator<Parma_Polyhedra_Library::Constraint, char, std::char_traits<char> >]'
/usr/local/include/c++/3.2/bits/stl_algobase.h:260:   instantiated from `_OutputIter std::__copy_aux2(_InputIter, _InputIter, _OutputIter, __false_type) [with _InputIter = Parma_Polyhedra_Library::ConSys::const_iterator, _OutputIter = std::ostream_iterator<Parma_Polyhedra_Library::Constraint, char, std::char_traits<char> >]'
/usr/local/include/c++/3.2/bits/stl_algobase.h:303:   instantiated from `_OutputIter std::__copy_ni2(_InputIter, _InputIter, _OutputIter, __false_type) [with _InputIter = Parma_Polyhedra_Library::ConSys::const_iterator, _OutputIter = std::ostream_iterator<Parma_Polyhedra_Library::Constraint, char, std::char_traits<char> >]'
/usr/local/include/c++/3.2/bits/stl_algobase.h:323:   instantiated from `_OutputIter std::__copy_ni1(_InputIter, _InputIter, _OutputIter, __false_type) [with _InputIter = Parma_Polyhedra_Library::ConSys::const_iterator, _OutputIter = std::ostream_iterator<Parma_Polyhedra_Library::Constraint, char, std::char_traits<char> >]'
/usr/local/include/c++/3.2/bits/stl_algobase.h:349:   instantiated from `_OutputIter std::copy(_InputIter, _InputIter, _OutputIter) [with _InputIter = Parma_Polyhedra_Library::ConSys::const_iterator, _OutputIter = std::ostream_iterator<Parma_Polyhedra_Library::Constraint, char, std::char_traits<char> >]'
gccbug.cc:68:   instantiated from here
/usr/local/include/c++/3.2/bits/stream_iterator.h:141: no match for `
   std::basic_ostream<char, std::char_traits<char> >& << const 
   Parma_Polyhedra_Library::Constraint&' operator
/usr/local/include/c++/3.2/bits/ostream.tcc:55: candidates are: 
   std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, 
   _Traits>::operator<<(std::basic_ostream<_CharT, 
   _Traits>&(*)(std::basic_ostream<_CharT, _Traits>&)) [with _CharT = char, 
   _Traits = std::char_traits<char>]
/usr/local/include/c++/3.2/bits/ostream.tcc:77:                 
   std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, 
   _Traits>::operator<<(std::basic_ios<_CharT, 
   _Traits>&(*)(std::basic_ios<_CharT, _Traits>&)) [with _CharT = char, _Traits 
   = std::char_traits<char>]
/usr/local/include/c++/3.2/bits/ostream.tcc:99:                 
   std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, 
   _Traits>::operator<<(std::ios_base&(*)(std::ios_base&)) [with _CharT = char, 
   _Traits = std::char_traits<char>]
/usr/local/include/c++/3.2/bits/ostream.tcc:171:                 
   std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, 
   _Traits>::operator<<(long int) [with _CharT = char, _Traits = 
   std::char_traits<char>]
/usr/local/include/c++/3.2/bits/ostream.tcc:208:                 
   std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, 
   _Traits>::operator<<(long unsigned int) [with _CharT = char, _Traits = 
   std::char_traits<char>]
/usr/local/include/c++/3.2/bits/ostream.tcc:146:                 
   std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, 
   _Traits>::operator<<(bool) [with _CharT = char, _Traits = 
   std::char_traits<char>]
/usr/local/include/c++/3.2/ostream:104:                 
   std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, 
   _Traits>::operator<<(short int) [with _CharT = char, _Traits = 
   std::char_traits<char>]
/usr/local/include/c++/3.2/ostream:115:                 
   std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, 
   _Traits>::operator<<(short unsigned int) [with _CharT = char, _Traits = 
   std::char_traits<char>]
/usr/local/include/c++/3.2/ostream:119:                 
   std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, 
   _Traits>::operator<<(int) [with _CharT = char, _Traits = 
   std::char_traits<char>]
/usr/local/include/c++/3.2/ostream:130:                 
   std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, 
   _Traits>::operator<<(unsigned int) [with _CharT = char, _Traits = 
   std::char_traits<char>]
/usr/local/include/c++/3.2/bits/ostream.tcc:234:                 
   std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, 
   _Traits>::operator<<(long long int) [with _CharT = char, _Traits = 
   std::char_traits<char>]
/usr/local/include/c++/3.2/bits/ostream.tcc:272:                 
   std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, 
   _Traits>::operator<<(long long unsigned int) [with _CharT = char, _Traits = 
   std::char_traits<char>]
/usr/local/include/c++/3.2/bits/ostream.tcc:298:                 
   std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, 
   _Traits>::operator<<(double) [with _CharT = char, _Traits = 
   std::char_traits<char>]
/usr/local/include/c++/3.2/ostream:145:                 
   std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, 
   _Traits>::operator<<(float) [with _CharT = char, _Traits = 
   std::char_traits<char>]
/usr/local/include/c++/3.2/bits/ostream.tcc:323:                 
   std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, 
   _Traits>::operator<<(long double) [with _CharT = char, _Traits = 
   std::char_traits<char>]
/usr/local/include/c++/3.2/bits/ostream.tcc:348:                 
   std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, 
   _Traits>::operator<<(const void*) [with _CharT = char, _Traits = 
   std::char_traits<char>]
/usr/local/include/c++/3.2/bits/ostream.tcc:120:                 
   std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, 
   _Traits>::operator<<(std::basic_streambuf<_CharT, _Traits>*) [with _CharT = 
   char, _Traits = std::char_traits<char>]
/usr/local/include/c++/3.2/ostream:211:                 
   std::basic_ostream<_CharT, _Traits>& 
   std::operator<<(std::basic_ostream<_CharT, _Traits>&, char) [with _CharT = 
   char, _Traits = std::char_traits<char>]
/usr/local/include/c++/3.2/bits/ostream.tcc:500:                 
   std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, 
   _Traits>&, char) [with _Traits = std::char_traits<char>]
/usr/local/include/c++/3.2/ostream:222:                 
   std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, 
   _Traits>&, signed char) [with _Traits = std::char_traits<char>]
/usr/local/include/c++/3.2/ostream:227:                 
   std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, 
   _Traits>&, unsigned char) [with _Traits = std::char_traits<char>]
/usr/local/include/c++/3.2/bits/ostream.tcc:572:                 
   std::basic_ostream<_CharT, _Traits>& 
   std::operator<<(std::basic_ostream<_CharT, _Traits>&, const char*) [with 
   _CharT = char, _Traits = std::char_traits<char>]
/usr/local/include/c++/3.2/bits/ostream.tcc:622:                 
   std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, 
   _Traits>&, const char*) [with _Traits = std::char_traits<char>]
/usr/local/include/c++/3.2/ostream:246:                 
   std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, 
   _Traits>&, const signed char*) [with _Traits = std::char_traits<char>]
/usr/local/include/c++/3.2/ostream:251:                 
   std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, 
   _Traits>&, const unsigned char*) [with _Traits = std::char_traits<char>]
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="gccbug.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="gccbug.cc"

Ci8vIFVuY29tbWVudCB0aGUgZm9sbG93aW5nIGxpbmUgdG8gc2VlIHRoZSBwcm9ibGVtIGdvIGF3
YXkuCi8vI2RlZmluZSBOT19ORVNURURfTkFNRVNQQUNFCgojaW5jbHVkZSA8aW9zdHJlYW0+CiNp
bmNsdWRlIDxpdGVyYXRvcj4KI2luY2x1ZGUgPGFsZ29yaXRobT4KCm5hbWVzcGFjZSBQYXJtYV9Q
b2x5aGVkcmFfTGlicmFyeSB7CgpjbGFzcyBDb25zdHJhaW50IHsKfTsKCmNsYXNzIENvblN5cyB7
CnB1YmxpYzoKICBDb25TeXMoKTsKICBDb25TeXMoY29uc3QgQ29uU3lzJiBjcyk7CiAgfkNvblN5
cygpOwogIENvblN5cyYgb3BlcmF0b3I9KGNvbnN0IENvblN5cyYgeSk7CgogIGNsYXNzIGNvbnN0
X2l0ZXJhdG9yCiAgICA6IHB1YmxpYyBzdGQ6Oml0ZXJhdG9yPHN0ZDo6Zm9yd2FyZF9pdGVyYXRv
cl90YWcsCgkJCSAgIENvbnN0cmFpbnQsCgkJCSAgIHZvaWQsCgkJCSAgIGNvbnN0IENvbnN0cmFp
bnQqLAoJCQkgICBjb25zdCBDb25zdHJhaW50Jj4gewogIHB1YmxpYzoKICAgIGNvbnN0X2l0ZXJh
dG9yKCk7CiAgICBjb25zdF9pdGVyYXRvcihjb25zdCBjb25zdF9pdGVyYXRvciYgeSk7CiAgICB+
Y29uc3RfaXRlcmF0b3IoKTsKICAgIGNvbnN0X2l0ZXJhdG9yJiBvcGVyYXRvcj0oY29uc3QgY29u
c3RfaXRlcmF0b3ImIHkpOwogICAgY29uc3QgQ29uc3RyYWludCYgb3Bl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BjczsKICBjb3B5KGNzLmJlZ2luKCks
IGNzLmVuZCgpLAogICAgICAgb3N0cmVhbV9pdGVyYXRvcjxDb25zdHJhaW50Pihjb3V0LCAiXG4i
KSk7Cn0K


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

end of thread, other threads:[~2002-11-05 19:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-05 11:26 c++/8448: Regression from gcc 2.96 concerning nested namespaces Wolfgang Bangerth
  -- strict thread matches above, loose matches on Subject: below --
2002-11-05 11:46 Martin Sebor
2002-11-05  9:56 Roberto Bagnara
2002-11-04  8:01 bangerth
2002-11-04  7:43 paolo
2002-11-04  6:56 bagnara

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