PR c/28286
* c-pragma.c (handle_pragma_pack): Handle invalid constants.
* gcc.dg/pragma-pack-4.c: New test.
From-SVN: r115550
+2006-07-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ PR c/28286
+ * c-pragma.c (handle_pragma_pack): Handle invalid constants.
+
2006-07-16 Eric Botcazou <ebotcazou@libertysurf.fr>
* doc/install.texi (sparc-sun-solaris2*): Add GMP version number.
}
else if (token == CPP_NUMBER)
{
+ if (TREE_CODE (x) != INTEGER_CST)
+ GCC_BAD ("invalid constant in %<#pragma pack%> - ignored");
align = TREE_INT_CST_LOW (x);
action = set;
if (c_lex (&x) != CPP_CLOSE_PAREN)
}
else if (token == CPP_NUMBER && action == push && align == -1)
{
+ if (TREE_CODE (x) != INTEGER_CST)
+ GCC_BAD ("invalid constant in %<#pragma pack%> - ignored");
align = TREE_INT_CST_LOW (x);
if (align == -1)
action = set;
+2006-07-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ PR c/28286
+ * gcc.dg/pragma-pack-4.c: New test.
+
2006-07-17 Lee Millward <lee.millward@gmail.com>
PR c++/28051
--- /dev/null
+/* PR c/28286 */
+/* { dg-do compile } */
+
+#pragma pack(0.5) /* { dg-warning "invalid constant" } */
+#pragma pack(push,0.5) /* { dg-warning "invalid constant" } */
+#pragma pack(push,x,0.5) /* { dg-warning "invalid constant" } */
+int i;