Which compiler pass prints a warning?
Florian Weimer
fw@deneb.enyo.de
Mon Sep 19 16:39:00 GMT 2016
* Jeff Law:
> On 09/18/2016 12:23 PM, Martin Sebor wrote:
>> On 09/17/2016 11:08 AM, Florian Weimer wrote:
>>> For warnings issued by the optimizers, is there a way to get the name
>>> of the pass which runs when the warning is generated?
>>
>> I don't know of an easy or reliable way other than to grep the source
>> code for the text of warning (or its substrings when it's split across
>> multiple lines).
> Correct. There's currently no way to know if a warning comes from the
> FE or any particular pass in the pipeline. I believe everyone greps
> for the warning in the sources to figure that out.
This doesn't really work for overflow warnings from fold, though.
(If they still exist, I haven't had to investigate one of those
with current GCC versions.)
More information about the Gcc-help
mailing list