Re: armcc -zasn
- From: "Wilco Dijkstra" <Wilco_dot_Dijkstra@xxxxxxxxxxxx>
- Date: Wed, 19 Apr 2006 21:58:56 GMT
<giribizzo@xxxxxxxx> wrote in message
news:1145461566.957420.182330@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,
I am using the -zasN armcc compiler option to set the alignment, but
the compiler (ADS 1.2) gives me a warning:
Warning: C2067I: option -zas will not be supported in future releases
of the compiler
How can I set the alignment in a non-deprecated way?
The first question you want to ask yourself is why you need to increase
structure alignment of all structures to a non-default setting? If you don't
have a good reason then using the default is best - the difference doesn't
matter in most cases.
You can control the alignment of a structure type using a bitfield of the
type you want to align to at the end. It can be zero sized, however it is
better to make padding bytes explicit using an anonymous bitfield.
You can control the alignments of objects by wrapping them in a union
containing a type with higher alignment or using the __align directive.
If you want lower the alignment, you have to use __packed instead.
Wilco
.
- References:
- armcc -zasn
- From: giribizzo@xxxxxxxx
- armcc -zasn
- Prev by Date: armcc -zasn
- Next by Date: Porting h.264 refernce code
- Previous by thread: armcc -zasn
- Next by thread: Porting h.264 refernce code
- Index(es):
Relevant Pages
|