On Thu, Aug 11, 2011 at 3:01 PM, Diego Novillo <dnovi...@google.com> wrote: > On Thu, Aug 11, 2011 at 03:27, Richard Guenther > <richard.guent...@gmail.com> wrote: >> On Wed, Aug 10, 2011 at 8:22 PM, Gabriel Charette <gch...@google.com> wrote: >>> There was a bug where c_finish_options would create some builtins and >>> assign them source_locations in the linemap other than BUILTINS_LOCATION == >>> 1. >>> >>> Thus, when calling DECL_IS_BUILTIN to know if a decl is a builtin, some of >>> them would return false as they had a source_location other than >>> BUILTINS_LOCATION within the line_map entry that was incorrectly created in >>> c_finish_options. >> >> DECL_IS_BUILTIN is almost never the appropriate thing to use, instead >> you should use DECL_BUILT_IN (and grepping, I see some suspicious uses >> ...). > > Gah. Then we need to get rid of one of these two. Whichever is used > fewer times, I suppose.
Well, they both make sense - you should just not confuse them. DECL_IS_BUILTIN should probably renamed to DECL_HAS_BUILTIN_SOURCE_LOCATION or similar. I'm testing a patch that fixes some bogus uses. Richard. > > Diego. >