https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81824

Khem Raj <raj.khem at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |raj.khem at gmail dot com

--- Comment #16 from Khem Raj <raj.khem at gmail dot com> ---
(In reply to Martin Sebor from comment #10)
> Author: msebor
> Date: Fri Nov  9 17:32:52 2018
> New Revision: 265980
> 
> URL: https://gcc.gnu.org/viewcvs?rev=265980&root=gcc&view=rev
> Log:
> PR middle-end/81824 - Warn for missing attributes with function aliases
> 
> gcc/c-family/ChangeLog:
> 
>       PR middle-end/81824
>       * c-attribs.c (handle_copy_attribute): New function.
> 
> gcc/cp/ChangeLog:
> 
>       PR middle-end/81824
>       * pt.c (warn_spec_missing_attributes): Move code to attribs.c.
>       Call decls_mismatched_attributes.
> 
> gcc/ChangeLog:
> 
>       PR middle-end/81824
>       * attribs.c (has_attribute): New helper function.
>       (decls_mismatched_attributes, maybe_diag_alias_attributes): Same.
>       * attribs.h (decls_mismatched_attributes): Declare.
>       * cgraphunit.c (handle_alias_pairs): Call maybe_diag_alias_attributes.
>       (maybe_diag_incompatible_alias): Use OPT_Wattribute_alias_.
>       * common.opt (-Wattribute-alias): Take an argument.
>       (-Wno-attribute-alias): New option.
>       * doc/extend.texi (Common Function Attributes): Document copy.
>       (Common Variable Attributes): Same.
>       * doc/invoke.texi (-Wmissing-attributes): Document enhancement.
>       (-Wattribute-alias): Document new option argument.
> 
> gcc/testsuite/ChangeLog:
> 
>       PR middle-end/81824
>       * gcc.dg/Wattribute-alias.c: New test.
>       * gcc.dg/Wmissing-attributes.c: New test.
>       * gcc.dg/attr-copy.c: New test.
>       * gcc.dg/attr-copy-2.c: New test.
>       * gcc.dg/attr-copy-3.c: New test.
>       * gcc.dg/attr-copy-4.c: New test.
> 
> 
> Added:
>     trunk/gcc/testsuite/gcc.dg/Wattribute-alias.c
>     trunk/gcc/testsuite/gcc.dg/Wmissing-attributes.c
>     trunk/gcc/testsuite/gcc.dg/attr-copy-2.c
>     trunk/gcc/testsuite/gcc.dg/attr-copy-3.c
>     trunk/gcc/testsuite/gcc.dg/attr-copy-4.c
>     trunk/gcc/testsuite/gcc.dg/attr-copy.c
> Modified:
>     trunk/gcc/ChangeLog
>     trunk/gcc/attribs.c
>     trunk/gcc/attribs.h
>     trunk/gcc/c-family/ChangeLog
>     trunk/gcc/c-family/c-attribs.c
>     trunk/gcc/cgraphunit.c
>     trunk/gcc/common.opt
>     trunk/gcc/cp/ChangeLog
>     trunk/gcc/cp/pt.c
>     trunk/gcc/doc/extend.texi
>     trunk/gcc/doc/invoke.texi
>     trunk/gcc/testsuite/ChangeLog
>     trunk/libgomp/libgomp.h



the new behavior is to not accept -Wattribute-alias and mutate this option into
-Wattribute-alias=, this conflicts with gcc8, is this planned move or do we
want to attach default level to -Wattribute-alias if no argument is used ?

Reply via email to