http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55881

--- Comment #5 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2013-01-08 
11:14:49 UTC ---
(In reply to comment #4)
> (In reply to comment #2)
> 
> > Well - confirmed.  Unlikely to be fixed.
> 
> That's _very_ unfortunate.  It makes the pragma almost useless in practice.

The pragma can only work if it somehow knows that location 5:19 is "expanded"
(inlined) from the location of "return i.foo(n)" since the code checks that the
location included in the warning is within the range of the pragma and "5:19"
is clearly not.

This could be implement in the same way as we currently handle macro
expansions, however, it won't be a  trivial amount of work, and it is quite
unlikely that any current developer has the free time and the interest
necessary to do it themselves.

If you really want this feature, you have to either try to implement it
yourself or convince someone to do it for you. Or you may do "n = n" and
silence the warning.

Reply via email to