|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
On Sat, 06 Oct 2007 12:17:12 -0700, Keith Thompson <kst-u@mib.org>
wrote: > santosh <santosh.k83@gmail.com> writes: > [...] > > Personally I'd prefer the Standardisation of the asm keyword and > > associated semantics, as has been done with C++, than further messing > > around with register. > > C++ defines the asm keyword and its syntax: > > asm ( string-literal ) ; > > but leaves its semantics entirely implementation-defined. > > I'm not convinced that this is useful. Any program that uses ``asm'' > is inherently non-portable, and must be modified if it's to be ported > to another platform. I don't see how standardizing part of the syntax > aids portability (or anything else). It allows other tools to correctly parse (the C part of) the code without needing to know the asm quirks for particular compiler(s). - formerly david.thompson1 || achar(64) || worldnet.att.net |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
David Thompson <dave.thompson2@verizon.net> writes:
> On Sat, 06 Oct 2007 12:17:12 -0700, Keith Thompson <kst-u@mib.org> > wrote: >> santosh <santosh.k83@gmail.com> writes: >> [...] >> > Personally I'd prefer the Standardisation of the asm keyword and >> > associated semantics, as has been done with C++, than further messing >> > around with register. >> >> C++ defines the asm keyword and its syntax: >> >> asm ( string-literal ) ; >> >> but leaves its semantics entirely implementation-defined. >> >> I'm not convinced that this is useful. Any program that uses ``asm'' >> is inherently non-portable, and must be modified if it's to be ported >> to another platform. I don't see how standardizing part of the syntax >> aids portability (or anything else). > > It allows other tools to correctly parse (the C part of) the code > without needing to know the asm quirks for particular compiler(s). That's an *excellent* point. In some circumstances, it might also be useful to write #define asm(str) /* something-or-other */ though of course it's subject to abuse. -- Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst> San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst> "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister" |
|
![]() |
| Outils de la discussion | |
|
|