Commit aa0db437 by Martin Sebor Committed by Martin Sebor

PR c/69507 - bogus warning: ISO C does not allow ‘__alignof__ (expression)’

gcc/testsuite/ChangeLog:

	PR c/69507
	* gcc.dg/alignof.c: New test.

gcc/c/ChangeLog:

	PR c/69507
	* c-parser.c (c_parser_alignof_expression): Avoid diagnosing
	__alignof__ (expression).

From-SVN: r237581
parent d42844f1
2016-06-19 Martin Sebor <msebor@redhat.com>
PR c/69507
* c-parser.c (c_parser_alignof_expression): Avoid diagnosing
__alignof__ (expression).
2016-06-14 David Malcolm <dmalcolm@redhat.com>
* c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
......
......@@ -7091,9 +7091,10 @@ c_parser_alignof_expression (c_parser *parser)
mark_exp_read (expr.value);
c_inhibit_evaluation_warnings--;
in_alignof--;
pedwarn (start_loc,
OPT_Wpedantic, "ISO C does not allow %<%E (expression)%>",
alignof_spelling);
if (is_c11_alignof)
pedwarn (start_loc,
OPT_Wpedantic, "ISO C does not allow %<%E (expression)%>",
alignof_spelling);
ret.value = c_alignof_expr (start_loc, expr.value);
ret.original_code = ERROR_MARK;
ret.original_type = NULL;
......
2016-06-19 Martin Sebor <msebor@redhat.com>
PR c/69507
* gcc.dg/alignof.c: New test.
2016-06-17 Paolo Carlini <paolo.carlini@oracle.com>
* g++.dg/cpp0x/constexpr-specialization.C: Adjust for dg-message
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment