This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/58963] Does C++ need flag_complex_method = 2?
- From: "congh at google dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 14 Nov 2013 18:04:24 +0000
- Subject: [Bug c++/58963] Does C++ need flag_complex_method = 2?
- Auto-submitted: auto-generated
- References: <bug-58963-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58963
--- Comment #3 from Cong Hou <congh at google dot com> ---
Suppose there is a third-party complex library, which is written in the same
way as <complex>. Then GCC could not recognize that as complex type, and will
not use builtin calls to calculate multiplication and division.
So why there should be a difference when I use the third-party complex lib and
the standard library lib. After all, <complex> is all written in source code.
<complex> is not the same as _Complex in C99.
If we can use _Complex in C++, it is fine. But C does not have <complex>: we
won't meet the situation that building the same file t.c using gcc and g++, and
g++ is faster. gcc cannot recognize <complex>.