On Tue, Sep 3, 2013 at 12:20 PM, Paulo Matos <pma...@broadcom.com> wrote: >> -----Original Message----- >> From: Richard Biener [mailto:richard.guent...@gmail.com] >> Sent: 03 September 2013 11:19 >> To: Paulo Matos >> Cc: gcc@gcc.gnu.org >> Subject: Re: Why DECL_BUILT_IN and DECL_IS_BUILTIN? >> >> On Tue, Sep 3, 2013 at 11:43 AM, Paulo Matos <pma...@broadcom.com> wrote: >> > Hi, >> > >> > Why do we have two macros in tree.h with seemingly the same semantics? >> DECL_BUILT_IN and DECL_IS_BUILTIN? >> >> The point is they are not the same. >> > > Thanks Richard. I could gather from inspecting GCC that they have different > definitions and probably are doing different things but I didn't understand > why they are different. Can you please elaborate on their differences?
DECL_IS_BUILTIN is true if the decl was created by the frontend / backend rather than by user code (indicated by source location). DECL_BUILT_IN is true if the decl represents a function of the standard library, a builtin that is recognized by optimization / expansion. User declared prototypes of C library functions are not DECL_IS_BUILTIN but may be DECL_BUILT_IN. Richard. > Thanks, > > Paulo Matos