c-pragma.c (handle_pragma_token): Handle `#pragma pack()' correctly.
authorMumit Khan <khan@xraylith.wisc.edu>
Wed, 9 Jun 1999 02:16:12 +0000 (02:16 +0000)
committerJeff Law <law@gcc.gnu.org>
Wed, 9 Jun 1999 02:16:12 +0000 (20:16 -0600)
        * c-pragma.c (handle_pragma_token): Handle `#pragma pack()'
        correctly.

From-SVN: r27432

gcc/ChangeLog
gcc/c-pragma.c

index f0673f45a2310b5809c47fad9b533942de27123c..b4f0985c781cd7352875990c0d1f9d5f7b7d4a30 100644 (file)
@@ -1,3 +1,8 @@
+Wed Jun  9 03:10:34 1999  Mumit Khan  <khan@xraylith.wisc.edu>
+
+       * c-pragma.c (handle_pragma_token): Handle `#pragma pack()'
+       correctly.
+
 Tue Jun  8 13:06:15 1999  Jim Wilson  <wilson@cygnus.com>
 
        * configure.in (rs6000-ibm-aix4.[12]*): Change rx6000 to rs6000.
index eedd0a13f0d6c28e4aef1a8d692f12ba75b15d85..de9cfb899e5590036c792ffdf2833c38083e1efd 100644 (file)
@@ -383,8 +383,17 @@ handle_pragma_token (string, token)
     case ps_left:
 
       if (token == NULL_TREE)
-       state = (strcmp (string, ")") ? ps_bad : ps_right);
-
+       {
+         /* #pragma pack () resets packing rules to their
+            defaults.  */
+         if (strcmp (string, ")") == 0)
+           {
+             align = 0;
+             state = ps_right;
+           }
+         else
+           state = ps_bad;
+       }
       else if (TREE_CODE (token) == INTEGER_CST)
        goto handle_align;