delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/06/09/03:12:49

X-Authentication-Warning: ieva01.lanet.lv: pavenis owned process doing -bs
Date: Wed, 9 Jun 1999 10:03:14 +0300 (WET)
From: Andris Pavenis <pavenis AT lanet DOT lv>
To: Mumit Khan <khan AT xraylith DOT wisc DOT EDU>
cc: Andris Pavenis <andris AT stargate DOT astr DOT lu DOT lv>, djgpp-workers AT delorie DOT com,
egcs-bugs AT egcs DOT cygnus DOT com
Subject: Re: problem with data alignment with egcs-19990602
In-Reply-To: <199906082242.RAA19006@mercury.xraylith.wisc.edu>
Message-ID: <Pine.A41.4.05.9906090958590.74872-100000@ieva01.lanet.lv>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com


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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019