c-family:
2013-04-03 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
* c-common.c (check_user_alignment): Emit error for negative values.
testsuite:
2013-04-03 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
* gcc.dg/c1x-align-3.c: Add test for negative power of 2.
From-SVN: r198417
+2013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
+
+ * c-common.c (check_user_alignment): Emit error for negative values.
+
2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
* c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
}
else if (allow_zero && integer_zerop (align))
return -1;
- else if ((i = tree_log2 (align)) == -1)
+ else if (tree_int_cst_sgn (align) == -1
+ || (i = tree_log2 (align)) == -1)
{
- error ("requested alignment is not a power of 2");
+ error ("requested alignment is not a positive power of 2");
return -1;
}
else if (i >= HOST_BITS_PER_INT - BITS_PER_UNIT_LOG)
+2013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
+
+ * gcc.dg/c1x-align-3.c: Add test for negative power of 2.
+
2013-04-29 Tom de Vries <tom@codesourcery.com>
* gcc.dg/pr50763.c: Update test.
_Alignas (-(__LONG_LONG_MAX__-1)/8) char i4; /* { dg-error "too large|power of 2" } */
_Alignas (-(__LONG_LONG_MAX__-1)/16) char i5; /* { dg-error "too large|power of 2" } */
_Alignas (-1) char j; /* { dg-error "power of 2" } */
+_Alignas (-2) char j; /* { dg-error "positive power of 2" } */
_Alignas (3) char k; /* { dg-error "power of 2" } */
_Alignas ((void *) 1) char k; /* { dg-error "integer constant" } */