This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13484] Addition of -fenable-msvc-relaxations option
- From: "dberlin at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Dec 2003 18:47:34 -0000
- Subject: [Bug c++/13484] Addition of -fenable-msvc-relaxations option
- References: <20031224024633.13484.s_gccbugzilla@nedprod.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From dberlin at gcc dot gnu dot org 2003-12-24 18:47 -------
(In reply to comment #3)
> MSVC based code just won't compile on GCC and all the GCC people say "tough,
> that's the standard".
In many cases this is true (IE the code is non-standard).
> I personally feel that's particularly unhelpful for two reasons: (i) This
> position is a particular *interpretation* of the standard
Please support this statement with data (ie quoets from the standard, or
whatever).
> and (ii) like it or
> not, a hell of a lot of code is written for MSVC first - compilers
are /tools/
> first before all else.
The reverse is true as well. A hell of a lot of code is written for G++ first
and then ported to MSVC. What is your point?
> When Symbian and GCC-XML based development relies so
> heavily on MSVC and GCC working similarly, it is a sign of the great strength
of
> the open source philosophy that one can say "yes, we can interoperate".
So create some patches, submit them, and if nobody likes them, put them on a
branch and maintain it.
Trying to get others to implement this, or accept it, without seeing working
code, isn't going to go over well at all.
> Especially if it's like five lines of extra code in G++ with no maintainence
> cost!
So submit the patch!
> Here we have an ideal case of why move constructors are so useful. Yes, the
ISO
> C++ standard will get them eventually.
And until then, the code is not standard.
G++ is not an experiment. It is a compiler for standard C++. There are
branches of G++ that implement experimental/etc parts that are being considered
for the standard. They are not in the mainline, and it is highly unlikely they
will be until those extras become standard.
There are of course, exceptions to every rule. Very well thought out (and some
not so well thought out) and prototyped extensions have been allowed in G++
before. They have caused heavy maintenance burden, and we are in the process of
deprecating and removing most of them.
You are more than welcome to get CVS write access (by submitting good patches
and filling out the approriate paperwork) and create your own branch, and
implement stuff there.
But, as it stands, mainline G++ compiles C++, not maybe C++ in 2009.
> However before then lots of MSVC people
> are using non-const copy constructors in their code to implement a move
> constructor.
And there code will be non-standard.
> Now try porting that to GCC. Answer is you can't unless you make the contents
of
> dllHandle all mutable which defeats the point of const.
> As I said before, for such a small *optional* addition to GCC you greatly
> improve its interoperability with MSVC.
Have you submitted the patch yet?
Nobody can say what will or will not be accepted for sure until you've actually
submitted the code.
>Which is the world's most popular C++
> compiler.
I'm not actually sure that's even true these days, to be honest (though
certainly a few years ago i would have agreed with you).
> Which has substantial benefits for Symbian development as well as
> GCC-XML.
You'll note that GCC-XML is also maintained as a patch to gcc, because it's not
suitable for inclusion in the mainline of gcc. If your patch is so great,
people will use it, regardless of whether it is included. Distributors of gcc
binaries might incorporate it, etc.
Anyway, this is all moot until you submit something.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13484