"Debarshi Ray" <[EMAIL PROTECTED]> writes:
> What is the style to be followed while using __attribute__ ((packed))
> and typedef with structures? I find both the following two variants in
> the code:
>
> a. struct __attribute__ ((packed)) _foo {
> ...
> };
> typedef struct _foo foo;
>
> b. typedef struct foo {
> ...
> } __attribute__ ((packed)) foo_t;
>
> Which is the preferred way to do this?
>
> I personally prefer the first one because:
> (i) typedef struct _foo foo; has been followed for most of the major
> structures like PedDisk, PedPartition, etc..
> (ii) Having the __attribute__ in the first line is more readable since
> the information is available immediately. One does not have to scroll
> down to see it.
>
> What are your views?
I agree with you. I think we should use the first one. Let's wait for
the others comments. ;-)
--
O T A V I O S A L V A D O R
---------------------------------------------
E-mail: [EMAIL PROTECTED] UIN: 5906116
GNU/Linux User: 239058 GPG ID: 49A5F855
Home Page: http://otavio.ossystems.com.br
---------------------------------------------
"Microsoft sells you Windows ... Linux gives
you the whole house."
_______________________________________________
parted-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/parted-devel