Mail Archives: djgpp-workers/1999/06/09/03:12:49
On Tue, 8 Jun 1999, Mumit Khan wrote:
> The alignment should revert to the default when `#pragma pack()' is
> encountered (ie., without an token between the '(' and ')').
>
> Does the following fix it?
Yes. Thanks.
However didn't completely rebuilt gcc. Make only rebuilt c-pragma.c
and relinked needed files, but I got 4 in output as it should be
when '#pragma pack()' works Ok.
Andris
>
> Tue Jun 8 17:31:18 1999 Mumit Khan <khan AT xraylith DOT wisc DOT edu>
>
> * c-pragma.c (handle_pragma_token): Handle `#pragma pack()'
> correctly.
>
> Index: c-pragma.c
> ===================================================================
> RCS file: /cvs/egcs/egcs/gcc/c-pragma.c,v
> retrieving revision 1.16
> diff -u -3 -p -r1.16 c-pragma.c
> --- c-pragma.c 1999/04/26 21:18:07 1.16
> +++ c-pragma.c 1999/06/08 23:37:49
> @@ -383,8 +383,15 @@ handle_pragma_token (string, token)
> case ps_left:
>
> if (token == NULL_TREE)
> - state = (strcmp (string, ")") ? ps_bad : ps_right);
> -
> + {
> + if (strcmp (string, ")") == 0)
> + {
> + align = 0;
> + state = ps_right;
> + }
> + else
> + state = ps_bad;
> + }
> else if (TREE_CODE (token) == INTEGER_CST)
> goto handle_align;
>
> Regards,
> Mumit
>
>
- Raw text -