--- maxreason <[EMAIL PROTECTED]> wrote: > > 2: From a linux C header file that I created a few years > ago --- that I am fairly sure used to compile properly --- the > following generate warnings and errors: > > typedef union vec004_64 { > f64 af64[4]; > struct { > f64 x, y, z, w; > }; > struct { > f64 m00, m01; > f64 m10, m11; > }; > } __attribute__ ((aligned(16))); // warning displayed here > // > // warning: "useless storage class specifier in empty declaration". > // The above happens on every similar declaration in the file. > // > // Then, down further, i get ***errors*** on every line like this: > // > typedef vec004_64 f64vec4; // error displayed on this line > typedef vec004_64 f64mat2x2; // error displayed on this line > // > // "expected '=', ',', ';', 'asm' or '__attribute__' before f64vec4 > // > I am confused. I remember not being familiar with the > __attribute__ syntax when I found it years ago --- but > at least it compiled and worked back then.
About typedef usage: The name of the new type must come after the old type. So the right code is: typedef union { f64 af64[4]; struct { f64 x, y, z, w; }; struct { f64 m00, m01; f64 m10, m11; }; } __attribute__ ((aligned(16))) vec004_64; typedef vec004_64 f64vec4; typedef vec004_64 f64mat2x2; Abra sua conta no Yahoo! Mail, o único sem limite de espaço para armazenamento! http://br.mail.yahoo.com/