[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-libc-dev] Doc suggestions

From: E. Weddington
Subject: [avr-libc-dev] Doc suggestions
Date: Thu, 02 Jan 2003 14:27:32 -0700

I have some additions I would like to suggest.

Under "Using the GNU Tools", Selected General Compiler Options:

     Let the type char be unsigned, like unsigned char. 

     Each kind of machine has a default for what char should be. It 
is either like unsigned char by default or like signed char by 

     Ideally, a portable program should always use signed char or 
unsigned char when it depends on the signedness of an object. But 
many programs have been written to use plain char and expect it to be 
signed, or expect it to be unsigned, depending on the machines they 
were written for. This option, and its inverse, let you make such a 
program work with the opposite default. 

     The type char is always a distinct type from each of signed char 
or unsigned char, even though its behavior is always just like one of 
those two. 

     Let the type char be signed, like signed char. 

     Note that this is equivalent to -fno-unsigned-char, which is the 
negative form of -funsigned-char. Likewise, the option -fno-signed-
char is equivalent to -funsigned-char. 

     These options control whether a bit-field is signed or unsigned, 
when the declaration does not use either signed or unsigned. By 
default, such a bit-field is signed, because this is consistent: the 
basic integer types such as int are signed types. 

     Allocate to an enum type only as many bytes as it needs for the 
declared range of possible values. Specifically, the enum type will 
be equivalent to the smallest integer type which has enough room. 

     Pack all structure members together without holes. 


The above descriptions are taken directly from the GCC manual. 
Perhaps they could be elaborated more (especially -fpack-struct).

Anyway, FWIW


reply via email to

[Prev in Thread] Current Thread [Next in Thread]