From: buers AT gmx DOT de (Dieter Buerssner) Newsgroups: comp.os.msdos.djgpp Subject: Re: inline trouble Date: 3 Feb 2000 02:55:52 GMT Lines: 54 Message-ID: <87aqnn$3i1ll$1@fu-berlin.de> References: <86i0tf$jnf$1 AT inf6serv DOT rug DOT ac DOT be> <86i2ub$jn8$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> <86pm0u$325jc$1 AT fu-berlin DOT de> <879ri7$a04$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> NNTP-Posting-Host: u-235.karlsruhe.ipdial.viaginterkom.de (62.180.10.235) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: fu-berlin.de 949546552 3737269 62.180.10.235 (16 [17104]) X-Posting-Agent: Hamster/1.3.8.0 User-Agent: Xnews/2.11.08 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com broeker AT acp3bf DOT physik DOT rwth-aachen DOT de (Hans-Bernhard Broeker) wrote in <879ri7$a04$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE>: >According to the explanation on the GCC web pages, the old method that >tolerated this was simply too broken to let it live. It could confuse >the optimizer into producing incorrect code, for some rare, but >existing cases. They claim they had no choice but to break backwards >compatibility, once and for all. Yes, this really seems to be their claim. And I know, this also is getting off topic here. Anyway, before I am going to write to the gcc maintainers, I might hear some comments from this forum about my suggestion. My naive algorithom to solve the dilemma would be: for any input in an asm construct, that is not on the output list, but is in the clobbered list, allocate a new variable, assign the input to that new variable and treat the input as if it was refering to that new variable. I.e.: /* This worked with older gcc versions, and from my understanding this was also documented as working */ type someval; asm( /* Use somereg, and modify somereg */ : /* output is not interesting in this example */ : ("somereg"), someval : (somereg) /* yes, somereg will be modified */ ); translate this to /* This works with gcc 2.95 */ type someval, tempval; tempval = someval; asm( /* Use somereg, and modify somereg */ : ("=somereg"), "tempval" : ("0"), "someval" /* no clobbered registers needed here */ ) This "translation", should be easy to code. But I must have overlooked something, otherwise this incompatible change in gcc behaviour would not make any sense. [I aske for an URL, that discusses this issue] >http://gcc.gnu.org/fom_serv/cache/23.html Thank you. Regards Dieter