Who is aldot again?

Bernhard Fischer rep.nop at aon.at
Sat Oct 15 21:16:34 UTC 2005


On Sat, Oct 15, 2005 at 02:18:06PM -0500, Rob Landley wrote:
>Regarding svn 11872:
>
>I spent a _long_ time trying to get loop.c to work at all reliably, so I have 
>an interest in it.

I don't think i broke it, did i?
>
>Erik didn't touch the file.  You're changing the date ranges on somebody 
>_else's_ copyrights.

Reverted. I was under the impression that it was a project-wide
copyright, which may be updated on behalf of the project coordinator.
>
>You argue against ? : because it's a documented gnu extension (and definitely 

No. I'm arguing against it as omitting the middle expression is a gnu
extension.

>not the only gnu extension we use, and this one has been picked up by other 
>compilers, such as intel's C compiler and TCC, which want to be able to 
>compile the Linux kernel).  Yet you also object to // comments which are c99.  

Yes they are c99. But e.g. c89 compilers choke on them. Furthermore (and this
is not an argument) it looks so much like C++ and is highly irritating if
you see // and are in C.

>Why does using c99 types but not c99 comments make sense?  You can't use 
>standards compliance as an argument against ? : while simultaneously arguing 
>against // which is in the standard.
>
>In this case, however, your change is saving us nine bytes under gcc 3.3.5.  I 
>don't understand why (_weird_ optimizer glitch), but I'm not going to argue 
>against it.  Mentioning this in the checkin as the _reason_ (and not some ISO 

Well, it wasn't the reason for it :)

>thing you yourself aren't adhering to in your checkin) would be a good thing.

Where did i not adhere that ISO thing in the checkin? Do you mean the
use of "a?a:b" ?

I don't have the spec handy and don't have a "pure" and strict iso C
compiler at hand, just this obscure one which tells me it knows about
c94:

# cat expr.c
#include <stdio.h>
int main(void) {
        int a = 1;
        int b = a ? 0 : 1;
        return b;
}
# cc -isoc94 -check -msg_enable level3  -o ex expr.c ; echo $?
0
# ./ex ; echo $?
0
# cat expr2.c
#include <stdio.h>
int main(void) {
	int a = 1;
	int b = a ? : 1;
	return b;
}
# cc -isoc94 -check -msg_enable level3  -o ex2 expr2.c ; echo $?
cc: Error: expr2.c, line 4: Invalid expression. (badexpr)
	int b = a ? : 1;
--------------------^
cc: Error: expr2.c, line 5: In this statement, "b" is not declared.
(undeclared)
	return b;
---------------^
cc: Info: expr2.c, line 3: This local identifier is declared but not
referenced in this module. (unrefadecl)
	int a = 1;
------------^
1
# cc -V
Compaq C V6.4-009 on Compaq Tru64 UNIX V5.1A (Rev. 1885)
Compiler Driver V6.4-008 (sys) cc Driver
#

If i don't mix things up, then iso C has "a?b:c" expressions.




More information about the busybox mailing list