[Bug c/96126] conflicting attribute section accepted on redeclaration

2020-09-16 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96126

Martin Sebor  changed:

   What|Removed |Added

   Target Milestone|--- |11.0
 Resolution|--- |FIXED
 Status|ASSIGNED|RESOLVED

--- Comment #4 from Martin Sebor  ---
Patch committed in r11-3239.

[Bug c/96126] conflicting attribute section accepted on redeclaration

2020-09-16 Thread cvs-commit at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96126

--- Comment #3 from CVS Commits  ---
The master branch has been updated by Martin Sebor :

https://gcc.gnu.org/g:71ad0b5dde449ee1f6b755a99f5c52152e375835

commit r11-3239-g71ad0b5dde449ee1f6b755a99f5c52152e375835
Author: Martin Sebor 
Date:   Wed Sep 16 14:04:01 2020 -0600

Detect conflicts between incompatible uses of the same attribute (PR
c/78666).

Resolves:
PR c/78666 - conflicting attribute alloc_size accepted
PR c/96126 - conflicting attribute section accepted on redeclaration

gcc/c-family/ChangeLog:

PR c/78666
PR c/96126
* c-attribs.c (validate_attr_args): New function.
(validate_attr_arg): Same.
(handle_section_attribute): Call it.  Introduce a local variable.
(handle_alloc_size_attribute):  Same.
(handle_alloc_align_attribute): Same.

gcc/testsuite/ChangeLog:

PR c/78666
PR c/96126
* gcc.dg/attr-alloc_align-5.c: New test.
* gcc.dg/attr-alloc_size-13.c: New test.
* gcc.dg/attr-section.c: New test.
* c-c++-common/builtin-has-attribute-3.c: Add xfails due to
expected
warnings to be cleaned up.

[Bug c/96126] conflicting attribute section accepted on redeclaration

2020-07-08 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96126

Martin Sebor  changed:

   What|Removed |Added

   Keywords||patch
   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=78666

--- Comment #2 from Martin Sebor  ---
See also pr78666.

Patch: https://gcc.gnu.org/pipermail/gcc-patches/2020-July/549686.html

[Bug c/96126] conflicting attribute section accepted on redeclaration

2020-07-08 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96126

Martin Sebor  changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |msebor at gcc dot 
gnu.org
   Last reconfirmed||2020-07-08
   Keywords||diagnostic
 Ever confirmed|0   |1
 Status|UNCONFIRMED |ASSIGNED

--- Comment #1 from Martin Sebor  ---
I'm testing a fix.