const int i;
A():i(1){}
A(const A& a):i(0){}
};
int main(){
return A(A()).i;
}
--
Summary: explicit call of a defined copy constructor does not
work
Product: gcc
Version: 4.4.4
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gcc at razorcam dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44409
--- Comment #3 from gcc at razorcam dot com 2010-06-03 23:04 ---
Thanks for your answers. From the above answers I understand that g++ respects
the ISO c++ standard, and thus you can consider this is not a bug. But this is
clearly an explicit call of the copy constructor, not an
ug_report.cc"
struct A{
static int i;
static void init() {i=0;}
};
int main(){
A::init();
}
--
Summary: ld returns 1 and reports undefined reference to a
defined static class variable
Product: gcc
Version: 4.4.4
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gcc at razorcam dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44528
CONFIRMED
Severity: major
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gcc at razorcam dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44559
--- Comment #3 from gcc at razorcam dot com 2010-06-16 17:20 ---
I apologize. Thanks for your quick answers.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44559
t S:Interface{
int i;
int _getI(){return i;}
};
template int f(Interface obj){return obj.getI();}
int main(){
S s; s.i=0;
return f(s);
}
--
Summary: very basic recurring template only works when using g++
-O option
Product: gcc
Version: 4.4.4
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gcc at razorcam dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44599
--- Comment #2 from gcc at razorcam dot com 2010-06-20 01:37 ---
Thanks. Yes, using &obj does work.
Sorry for this bug report from me.
Bug resolved: invalid.
--
gcc at razorcam dot com changed:
What|Removed |A
U:T{
void f(){i=0;}
};
--
Summary: basic template struct has no direct access to members of
a basic parent template struct
Product: gcc
Version: 4.4.4
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gcc at razorcam dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44607
--- Comment #3 from gcc at razorcam dot com 2010-06-21 13:55 ---
Sorry again. I am reading again the ISO c++ standard in order to avoid invalid
bug reports. It should occupy me for some time. Is there a c++ lint program
that could help you when you don't know all the tricks of the