Re: Linux without the GNU toolchain?
From: Peter T. Breuer (ptb_at_oboe.it.uc3m.es)
Date: 10/14/05
- Next message: Peter T. Breuer: "Re: Linux at school with notebooks"
- Previous message: Martin Blume: "Re: Recovering Really Old Zip Files"
- In reply to: Chris Barts: "Re: Linux without the GNU toolchain?"
- Next in thread: Peter T. Breuer: "Re: Linux without the GNU toolchain?"
- Reply: Peter T. Breuer: "Re: Linux without the GNU toolchain?"
- Reply: Netocrat: "Re: Linux without the GNU toolchain?"
- Reply: Chris Barts: "Re: Linux without the GNU toolchain?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 14 Oct 2005 12:36:30 +0200
Chris Barts <chbarts+usenet@gmail.com> wrote:
> Peter T. Breuer wrote:
>>
>> It's simply not likely. This is C, according to gcc:
>>
>>
>> *(4|1) = 5;
> Not according to gcc 4.0.1. I tried to compile a program with that line and
> got the error "invalid type argument of 'unary *'".
Uh, you're right. Throw a cast to int * in there somewhere.
% cat foo.c
main() {
*(int *)(4|1) = 5;
}
% gcc foo.c
%
(gcc 2.95). Basically, calculated lvalues are a11ow3d. A cast should
mean it's an rvalue by definition.
> Variadic macros are standard as of the C standard of 1999, but it's pretty
> dumb to code to that standard if you want code portable to more than a very
> few compilers. Computed gotos, nested functions, and the typeof() macro are
> all nonstandard, nonportable GNU C, however.
Did we mention offsetof()? And all the sizeof() stuff boils down to
__gcc_builtin_sizeof() so it's deeply implementation dependent even
for calculating constants.
Peter
- Next message: Peter T. Breuer: "Re: Linux at school with notebooks"
- Previous message: Martin Blume: "Re: Recovering Really Old Zip Files"
- In reply to: Chris Barts: "Re: Linux without the GNU toolchain?"
- Next in thread: Peter T. Breuer: "Re: Linux without the GNU toolchain?"
- Reply: Peter T. Breuer: "Re: Linux without the GNU toolchain?"
- Reply: Netocrat: "Re: Linux without the GNU toolchain?"
- Reply: Chris Barts: "Re: Linux without the GNU toolchain?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|