public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug regression/38278] New: C++ namespace collision
@ 2008-11-26 15:32 holger dot hopp at sap dot com
2008-11-26 17:09 ` [Bug c++/38278] [4.4 Regression] " rguenth at gcc dot gnu dot org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: holger dot hopp at sap dot com @ 2008-11-26 15:32 UTC (permalink / raw)
To: gcc-bugs
I've got following namespace collision with gcc trunk rev. 142220.
It works for gcc <= 4.3 and trunk rev. <= 142038.
$ gcc-4.4 -c tst.c
tst.c:8: error: declaration of 'static __number
_Numeric_limits_base<__number>::min()'
tst.c:2: error: changes meaning of 'min' from 'const _Tp& min(const _Tp&, const
_Tp&)'
Exit 1
// source:
template <class _Tp>
inline const _Tp& (min)(const _Tp& __a, const _Tp& __b) { return __b < __a ?
__b : __a; }
template <class __number>
class _Numeric_limits_base {
public:
static __number ( min)() { return __number(); }
};
--
Summary: C++ namespace collision
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: regression
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: holger dot hopp at sap dot com
GCC build triplet: x86_64-unknown-linux-gnu
GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38278
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/38278] [4.4 Regression] C++ namespace collision
2008-11-26 15:32 [Bug regression/38278] New: C++ namespace collision holger dot hopp at sap dot com
@ 2008-11-26 17:09 ` rguenth at gcc dot gnu dot org
2008-11-27 10:30 ` jakub at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-11-26 17:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from rguenth at gcc dot gnu dot org 2008-11-26 17:08 -------
This is perfectly valid code. It works when you omit the parens around min -
smells related to a recent fix that I don't remember ...
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Component|regression |c++
Ever Confirmed|0 |1
Keywords| |rejects-valid
Known to work| |4.3.2
Priority|P3 |P1
Last reconfirmed|0000-00-00 00:00:00 |2008-11-26 17:08:08
date| |
Summary|C++ namespace collision |[4.4 Regression] C++
| |namespace collision
Target Milestone|--- |4.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38278
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/38278] [4.4 Regression] C++ namespace collision
2008-11-26 15:32 [Bug regression/38278] New: C++ namespace collision holger dot hopp at sap dot com
2008-11-26 17:09 ` [Bug c++/38278] [4.4 Regression] " rguenth at gcc dot gnu dot org
@ 2008-11-27 10:30 ` jakub at gcc dot gnu dot org
2008-11-27 17:41 ` jsm28 at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-11-27 10:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from jakub at gcc dot gnu dot org 2008-11-27 10:29 -------
Introduced by PR28513 fix
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142056
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38278
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/38278] [4.4 Regression] C++ namespace collision
2008-11-26 15:32 [Bug regression/38278] New: C++ namespace collision holger dot hopp at sap dot com
2008-11-26 17:09 ` [Bug c++/38278] [4.4 Regression] " rguenth at gcc dot gnu dot org
2008-11-27 10:30 ` jakub at gcc dot gnu dot org
@ 2008-11-27 17:41 ` jsm28 at gcc dot gnu dot org
2008-11-27 17:45 ` jsm28 at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-11-27 17:41 UTC (permalink / raw)
To: gcc-bugs
--
jsm28 at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P1 |P2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38278
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/38278] [4.4 Regression] C++ namespace collision
2008-11-26 15:32 [Bug regression/38278] New: C++ namespace collision holger dot hopp at sap dot com
` (2 preceding siblings ...)
2008-11-27 17:41 ` jsm28 at gcc dot gnu dot org
@ 2008-11-27 17:45 ` jsm28 at gcc dot gnu dot org
2008-11-28 14:45 ` jason at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-11-27 17:45 UTC (permalink / raw)
To: gcc-bugs
--
jsm28 at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P2 |P1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38278
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/38278] [4.4 Regression] C++ namespace collision
2008-11-26 15:32 [Bug regression/38278] New: C++ namespace collision holger dot hopp at sap dot com
` (3 preceding siblings ...)
2008-11-27 17:45 ` jsm28 at gcc dot gnu dot org
@ 2008-11-28 14:45 ` jason at gcc dot gnu dot org
2008-11-28 21:26 ` jason at gcc dot gnu dot org
2008-11-28 22:16 ` jason at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu dot org @ 2008-11-28 14:45 UTC (permalink / raw)
To: gcc-bugs
--
jason at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jason at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2008-11-26 17:08:08 |2008-11-28 14:43:50
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38278
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/38278] [4.4 Regression] C++ namespace collision
2008-11-26 15:32 [Bug regression/38278] New: C++ namespace collision holger dot hopp at sap dot com
` (4 preceding siblings ...)
2008-11-28 14:45 ` jason at gcc dot gnu dot org
@ 2008-11-28 21:26 ` jason at gcc dot gnu dot org
2008-11-28 22:16 ` jason at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu dot org @ 2008-11-28 21:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from jason at gcc dot gnu dot org 2008-11-28 21:25 -------
Subject: Bug 38278
Author: jason
Date: Fri Nov 28 21:23:38 2008
New Revision: 142263
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142263
Log:
PR c++/38278
* parser.c (cp_parser_class_name): Only call
maybe_note_name_used_in_class if we actually found a class name.
Added:
trunk/gcc/testsuite/g++.dg/lookup/name-clash8.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/parser.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38278
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/38278] [4.4 Regression] C++ namespace collision
2008-11-26 15:32 [Bug regression/38278] New: C++ namespace collision holger dot hopp at sap dot com
` (5 preceding siblings ...)
2008-11-28 21:26 ` jason at gcc dot gnu dot org
@ 2008-11-28 22:16 ` jason at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu dot org @ 2008-11-28 22:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jason at gcc dot gnu dot org 2008-11-28 22:14 -------
Fixed.
--
jason at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38278
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-11-28 22:16 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-26 15:32 [Bug regression/38278] New: C++ namespace collision holger dot hopp at sap dot com
2008-11-26 17:09 ` [Bug c++/38278] [4.4 Regression] " rguenth at gcc dot gnu dot org
2008-11-27 10:30 ` jakub at gcc dot gnu dot org
2008-11-27 17:41 ` jsm28 at gcc dot gnu dot org
2008-11-27 17:45 ` jsm28 at gcc dot gnu dot org
2008-11-28 14:45 ` jason at gcc dot gnu dot org
2008-11-28 21:26 ` jason at gcc dot gnu dot org
2008-11-28 22:16 ` jason 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).