diff options
author | dodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-09-04 12:54:09 +0000 |
---|---|---|
committer | dodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-09-04 12:54:09 +0000 |
commit | 2f90489d16664569d24c3bc621f4cd99b49c1180 (patch) | |
tree | 176424902166f5edeed2bd7007f7ecee9148c4da /gcc | |
parent | 818a28e117c01b527a96ac1f9b1f0de832ee2694 (diff) | |
download | gcc-2f90489d16664569d24c3bc621f4cd99b49c1180.tar.gz |
More comments about DECL_BUILT_IN and DECL_IS_BUILTIN
gcc/
* tree.h (DECL_BUILT_IN, DECL_IS_BUILTIN): Add more comments
explaining their differences.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202251 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/tree.h | 11 |
2 files changed, 15 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a8dce3e7c9c..0b51fa2971e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2013-09-04 Dodji Seketeli <dodji@redhat.com> + + * tree.h (DECL_BUILT_IN, DECL_IS_BUILTIN): Add more comments + explaining their differences. + 2013-09-04 Sandeep Kumar Singh<Sandeep.Singh2@kpitcummins.com> * config/rx/rx.h: Add option -mcpu for target variants RX100 and RX200. diff --git a/gcc/tree.h b/gcc/tree.h index 718d8f45276..88d527ac89e 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -1838,6 +1838,9 @@ extern enum machine_mode vector_type_mode (const_tree); #define DECL_SOURCE_FILE(NODE) LOCATION_FILE (DECL_SOURCE_LOCATION (NODE)) #define DECL_SOURCE_LINE(NODE) LOCATION_LINE (DECL_SOURCE_LOCATION (NODE)) #define DECL_SOURCE_COLUMN(NODE) LOCATION_COLUMN (DECL_SOURCE_LOCATION (NODE)) +/* This accessor returns TRUE if the decl it operates on was created + by a front-end or back-end rather than by user code. In this case + builtin-ness is indicated by source location. */ #define DECL_IS_BUILTIN(DECL) \ (LOCATION_LOCUS (DECL_SOURCE_LOCATION (DECL)) <= BUILTINS_LOCATION) @@ -2486,7 +2489,13 @@ extern vec<tree, va_gc> **decl_debug_args_insert (tree); #define DECL_STRUCT_FUNCTION(NODE) \ (FUNCTION_DECL_CHECK (NODE)->function_decl.f) -/* In a FUNCTION_DECL, nonzero means a built in function. */ +/* In a FUNCTION_DECL, nonzero means a built in function of a + standard library or more generally a built in function that is + recognized by optimizers and expanders. + + Note that it is different from the DECL_IS_BUILTIN accessor. For + instance, user declarated prototypes of C library functions are not + DECL_IS_BUILTIN but may be DECL_BUILT_IN. */ #define DECL_BUILT_IN(NODE) (DECL_BUILT_IN_CLASS (NODE) != NOT_BUILT_IN) /* For a builtin function, identify which part of the compiler defined it. */ |