On 01/02/2018 04:07 PM, Jakub Jelinek wrote:
Hi!

If lookup_name_fuzzy finds an exact match with a macro, it later in the dtor
uses node->value.macro->line in libcpp.  The problem is that for builtin
macros node->value.macro contains garbage, we use node->value.builtin union
member in those cases instead.  It doesn't make any sense to look up
location of a builtin macro definition anyway, those are very special
entities.  So, this patch just ignores those, because we can't do anything
useful with them.

Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

2018-01-02  Jakub Jelinek  <ja...@redhat.com>

        PR preprocessor/83602
        * name-lookup.c (lookup_name_fuzzy): Don't use macro_use_before_def
        for builtin macros.

        * g++.dg/cpp/pr83602.C: New test.

ok


--
Nathan Sidwell

Reply via email to