Bug in g++?
Bug in g++?
- Subject: Bug in g++?
- From: Steve Checkoway <email@hidden>
- Date: Fri, 6 Oct 2006 00:27:43 -0700
In the past few weeks, I've hit a problem with g++ 4.0.1. It seems to
affect FSF g++ from 3.4 to 4.1, but in slightly different ways
depending on the version.
Another developer distilled a simple test case to exhibit what seems
to be a bug in the compiler and filed a bug at bugs.debian.org
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=391334>. To quote
from that bug:
t.cc: In member function ‘void ThemeMetric<T>::Read() [with T =
GoalType]’:
t.cc:32: instantiated from here
t.cc:22: error: no matching function for call to ‘FromStack
(GoalType&)’
t.cc:3: note: candidates are: void LuaHelpers::FromStack(bool&)
t.cc:4: note: void LuaHelpers::FromStack(float&)
t.cc:5: note: void LuaHelpers::FromStack(int&)
This happens on 3.4 through 4.1. This error goes away if
- LuaHelpers::FromStack(GoalType&) is declared above the template,
- FromStack is removed from the namespace, or "using namespace
LuaHelpers"
- "using namespace LuaHelpers" is used and FromStack is used without
LuaHelpers:: qualifier (3.4 through 4.0, not 4.1);
- ThemeMetric<T>::Read() is not virtual;
- FromStack is a template and each type is a specialization
If this code isn't valid, I'm not seeing why, or why Read being
virtual
or FromStack being in a namespace would affect it.
The code in question is attached to the bug report <http://
bugs.debian.org/cgi-bin/bugreport.cgi/t.cc?bug=391334;msg=5;att=1>.
Is this actually a bug in the compiler and if so should I file a
radar or just wait for upstream to fix it and for Apple to synchronize?
--
Steve Checkoway
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden