]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR c/50459 (alignof doesn't work on plain old constant, works with expressions...
authorMarek Polacek <polacek@redhat.com>
Fri, 9 May 2014 08:24:37 +0000 (08:24 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Fri, 9 May 2014 08:24:37 +0000 (08:24 +0000)
commit661a0813da5f8b3d3085ec3481e6928e6cadca03
tree35edbf8e14134b0cba3c9df371c7f28c16b8e69b
parentee3958cfe190f6c0925deb9f3c573b87dc6c9ca4
re PR c/50459 (alignof doesn't work on plain old constant, works with expressions containing it)

PR c/50459
c-family/
* c-common.c (check_user_alignment): Return -1 if alignment is error
node.
(handle_aligned_attribute): Don't call default_conversion on
FUNCTION_DECLs.
(handle_vector_size_attribute): Likewise.
(handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
(handle_sentinel_attribute): Call default_conversion and allow even
integral types as an argument.
c/
* c-parser.c (c_parser_attributes): Parse the arguments as an
expression-list if the attribute takes identifier.
testsuite/
* c-c++-common/attributes-1.c: Move test line to a new test.
* c-c++-common/attributes-2.c: New test.
* c-c++-common/pr50459.c: New test.
* c-c++-common/pr59280.c: Add "undeclared" to dg-error.
* gcc.dg/nonnull-2.c: Likewise.
* gcc.dg/pr55570.c: Modify dg-error.
* gcc.dg/tm/wrap-2.c: Likewise.

From-SVN: r210262
12 files changed:
gcc/c-family/ChangeLog
gcc/c-family/c-common.c
gcc/c/ChangeLog
gcc/c/c-parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/attributes-1.c
gcc/testsuite/c-c++-common/attributes-2.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/pr50459.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/pr59280.c
gcc/testsuite/gcc.dg/nonnull-2.c
gcc/testsuite/gcc.dg/pr55570.c
gcc/testsuite/gcc.dg/tm/wrap-2.c