This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/18644] [3.3/3.4/4.0 regression] -Wsynth warning in <complex>
- From: "gdr at integrable-solutions dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Nov 2004 03:16:08 -0000
- Subject: [Bug libstdc++/18644] [3.3/3.4/4.0 regression] -Wsynth warning in <complex>
- References: <20041124043902.18644.bangerth@dealii.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From gdr at integrable-solutions dot net 2004-11-26 03:16 -------
Subject: Re: [3.3/3.4/4.0 regression] -Wsynth warning in <complex>
"bangerth at dealii dot org" <gcc-bugzilla@gcc.gnu.org> writes:
| I am not an expert in ABI questions, but in my naive world constructors
| are somewhat different than regular functions if they are declared
| inline (and synthesized constructors always are):
The issue is not taking the address of the copy constructor, but the
change in calling convention. It you declare a copy consttuctor, you
change the ABI in the sense that the compiler is now forced to pass
everything in stack, where it used to pass it in register.
| - you can't take the address of a constructor
| - (old) code linked against a new libstdc++ with a new constructor would
| be fine since the old synthesized constructor had been inlined
No, it won't because on plateforms where they are expecting the result
of a complex<>-returning function to come in register they will get
garbage.
The diagnostic is nonsensical. The fix is to fix the diagnostic, not
to paper over the problem.
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18644