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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marxin at gcc dot gnu.org

--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #1)
> Confirmed.  profile-arcs is not supposed to be used in optimize pragmas or
> attributes and GCC should emit an error here but somehow it does not.

Starting from your commit r237174, we properly show warning and
the code is not instrumented:

/home/marxin/Programming/testcases/pr68025-2.c:2:9: warning: bad option
-fprofile-arcs to pragma attribute [-Wpragmas]
 #pragma GCC optimize("profile-arcs")
         ^~~
/home/marxin/Programming/testcases/pr68025-2.c:5:1: warning: bad option
-fprofile-arcs to optimize attribute [-Wattributes]
 {

Reply via email to