I believe this was answered in the tools newsgroup originally
(qdn.public.qnxrtp.os isn’t the best place for a compiler question) but I’ve
posted the answer below.
With a PC, I always felt limited by the software available.
On Unix, I am limited only by my knowledge.
–Peter J. Schoenster <email@example.com>
From the gcc info docs:
Specifying Attributes of Variables
__attribute__' allows you to specify special attributes of variables or structure fields. This keyword is followed by an attribute specification inside double parentheses. Eight attributes are currently defined for variables: aligned’,
transparent_union', unused’, and `weak’. Other
attributes are available for functions (*note Function Attributes: and
for types (*note Type Attributes::).
packed' The packed’ attribute specifies that a variable or structure field
should have the smallest possible alignment–one byte for a
variable, and one bit for a field, unless you specify a larger
value with the `aligned’ attribute.
Here is a structure in which the field
x' is packed, so that it immediately follows a’:
int x attribute ((packed));
“pdaj” <firstname.lastname@example.org> wrote in message
I have a program that compiles fine with QNX 6.1.0 but doesn’t work with
6.1.0 + patch A. The compiler gives a warning about the line:
I presume that the definition of pragma has changed in patch A. Can
tell me what this line should be - I am trying to align data to two byte
Also where can I find information on this sort of compiler specific issue
for the latest release? I could not find anything searching the help docs
or QNX website.