This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: MS/CW-style inline assembly for GCC
For me, compatibility is the number one priority. Ease of use comes
That's what I figured. :-)
So, let's take truth-and-beauty out of the discussion; this isn't about
a better technology. It might or might not be better, but that's not
the root of the issue. The bottom line is that Apple wants CW syntax
because it wants to convert existing CW users to GCC users. To do that,
it wants to be able to say "you can just recompile your code" rathern
than "you have to rewrite your code". In fact, for all widely-used CW
extensions, Apple would probably like to see them in GCC. It's easy to
see the Apple product-marketing logic here.
In contrast, GCC has (for good or bad) been moving away from
compatibility with particular compilers towards strict conformance to
standards. In C/C++, we've made little effort to be source-compatible
even with older versions of GCC, let alone other compilers. Where we've
found that we've accepted invalid code, we've often closed the loophole,
for example.
I actually think it would be nice to have the CW functionality in the
FSF GCC -- on an Apple-specific branch. It would be good if Apple users
could use the FSF repository. But, the non-Apple developers don't want
to have to deal with these extensions; they provide no benefit to
non-Apple developers. If Apple checks in these extensions, in any way
that touches code outside of darwin.[hc], then all developers pay a cost
-- but reap no benefit. The non-Apple developers are seeing this as
somewhat technically dubious functionality of no general utility, but
with non-zero cost now and in future.
CW-compatibility is in contrast to a feature like PCH which, while
developed in response to Apple business requirements, is broadly useful.
--
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark@codesourcery.com