This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Deprecating GCC extensions...


Fergus Henderson <fjh@cs.mu.oz.au> writes:

> On 28-Feb-2001, Neil Booth <neil@daikokuya.demon.co.uk> wrote:
> > Whilst we're on the topic of deprecating extensions, is there any support
> > for deprecating multi-line strings for GCC 3.0?
> 
> That particular GCC extension is one that I've only ever seen used by
> accident, and often causes portability problems in Mercury code.


I've seen it very often, especially in Linux low level code. It is very useful
to write readable inline assembler.


Compare:

asm("movl x,y\n\t"
    "movl y,z\n\t"
    "cmpl bla,blub\n\t")


to 

asm("movl x,y
     movl y,z
     cmpl bla,blub"); 



The second is clearly more readable. I guess if you really wanted to deprecate
it you would need to supply some alternative to make the assembler readable again.
I suspect you'll break quite a lot of code though.


-Andi


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]