nls-technical
[Top] [All Lists]

Re: [nls-technical] [Fwd: Re: NLS/AUGMENT question.]

To: Alex Bochannek <alex@p9.com>
Cc: NLS Restoration Technical Discussion <nls-technical@chm.cim3.net>, Ken Harrenstien <klh@panix.com>
From: Mark Crispin <mrc@CAC.Washington.EDU>
Date: Fri, 2 Mar 2007 19:30:57 -0800 (PST)
Message-id: <alpine.OSX.0.83.0703021913310.19417@pangtzu.panda.com>
On Fri, 2 Mar 2007, Alex Bochannek wrote:
> It seems like the original code is undefined per ISO C standards. In
> section 6.7.1 and footnote 100 it says that any operation other than
> sizeof on an array declared register (even if member of struct) is
> undefined. Of course, it also says that the compiler implementation is
> free to use storage class auto instead of register, which is probably
> why this code works.    (01)

This doesn't make sense.  In the statement:
        d.HI = r ? w10mask : w10zero;
r is register int and d is register dw10_t.  Presumably the complaint is 
about d, because that's the only thing that approaches being an "array 
declared register".  But then there is no reason that:
           if (r) {
               d.HI = w10mask;
           } else {
               d.HI = w10zero;
should work.    (02)

> The reason GCC complains with the conditional operator is because of a
> check in the expression handling code, which is not being called when
> using an if/then/else. The reason this wasn't an issues in older GCC
> versions is because of differences in how the parser and the
> middle-end are implemented in GCC4.    (03)

I don't have this problem with gcc4 on Mac OS X.    (04)

This is Ken's decision, not mine.  I'm just another user of his excellent 
product.    (05)

IMHO, the f*cking compiler writers should fix their compiler rather than 
tell people to change code that compiles everyplace else to accomodate 
their compiler.  Perhaps with a few massages to their noggins with a 
ball-peen hammer to the repeated tune of "Thou shalt NOT break 
compatibility with deployed code" and "Thou art NOT the Obscure 
Specification Nits Enforcement Police".    (06)

Nonetheless, for your (NLS Restoration Project) needs, I'd say just modify 
the code as you need and be done with the issue.  The whole benefit of 
open source is that you shouldn't have to beg someone to change something 
for you.  You can make the change yourself.    (07)

-- Mark --    (08)

http://panda.com/mrc
Democracy is two wolves and a sheep deciding what to eat for lunch.
Liberty is a well-armed sheep contesting the vote.    (09)

_________________________________________________________________
Message Archives: http://chm.cim3.net/forum/nls-technical/
Shared Files: http://chm.cim3.net/file/work/project/nls-restore/
Community Portal: http://www.computerhistory.org/  
To Post: mailto:nls-technical@chm.cim3.net
Community Wiki: http://chm.cim3.net/cgi-bin/wiki.pl?NLS_Restoration    (010)
<Prev in Thread] Current Thread [Next in Thread>