diff options
author | Dodji Seketeli <dodji@redhat.com> | 2011-07-15 21:34:02 +0000 |
---|---|---|
committer | Dodji Seketeli <dodji@gcc.gnu.org> | 2011-07-15 23:34:02 +0200 |
commit | d0a9fbe16c999748339a5fe77da8e6687337d0e0 (patch) | |
tree | 8e55847d83bb45140b1baa1cd4d7e29a872315ab | |
parent | 6feeed065cba3185d087aa70a5a7493a4a7bbc3b (diff) | |
download | gcc-d0a9fbe16c999748339a5fe77da8e6687337d0e0.zip gcc-d0a9fbe16c999748339a5fe77da8e6687337d0e0.tar.gz gcc-d0a9fbe16c999748339a5fe77da8e6687337d0e0.tar.bz2 |
Use source_location where it is due
libcpp/
* directives.c (struct if_stack): Use source_location as type
here.
* include/cpplib.h (struct cpp_callbacks)<include, define, undef,
indent, def_pragma, used_define, used_undef>: Properly use
source_location as parameter type, rather than unsigned int.
From-SVN: r176333
-rw-r--r-- | libcpp/ChangeLog | 8 | ||||
-rw-r--r-- | libcpp/directives.c | 2 | ||||
-rw-r--r-- | libcpp/include/cpplib.h | 14 |
3 files changed, 16 insertions, 8 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index 6abcb25..9a9c71f 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,3 +1,11 @@ +2011-07-15 Dodji Seketeli <dodji@redhat.com> + + * directives.c (struct if_stack): Use source_location as type + here. + * include/cpplib.h (struct cpp_callbacks)<include, define, undef, + indent, def_pragma, used_define, used_undef>: Properly use + source_location as parameter type, rather than unsigned int. + 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> PR target/39150 diff --git a/libcpp/directives.c b/libcpp/directives.c index 85e941e..83d4a0e 100644 --- a/libcpp/directives.c +++ b/libcpp/directives.c @@ -32,7 +32,7 @@ along with this program; see the file COPYING3. If not see struct if_stack { struct if_stack *next; - linenum_type line; /* Line where condition started. */ + source_location line; /* Line where condition started. */ const cpp_hashnode *mi_cmacro;/* macro name for #ifndef around entire file */ bool skip_elses; /* Can future #else / #elif be skipped? */ bool was_skipping; /* If were skipping on entry. */ diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h index 8fa2881..55b0f1b 100644 --- a/libcpp/include/cpplib.h +++ b/libcpp/include/cpplib.h @@ -479,12 +479,12 @@ struct cpp_callbacks void (*file_change) (cpp_reader *, const struct line_map *); void (*dir_change) (cpp_reader *, const char *); - void (*include) (cpp_reader *, unsigned int, const unsigned char *, + void (*include) (cpp_reader *, source_location, const unsigned char *, const char *, int, const cpp_token **); - void (*define) (cpp_reader *, unsigned int, cpp_hashnode *); - void (*undef) (cpp_reader *, unsigned int, cpp_hashnode *); - void (*ident) (cpp_reader *, unsigned int, const cpp_string *); - void (*def_pragma) (cpp_reader *, unsigned int); + void (*define) (cpp_reader *, source_location, cpp_hashnode *); + void (*undef) (cpp_reader *, source_location, cpp_hashnode *); + void (*ident) (cpp_reader *, source_location, const cpp_string *); + void (*def_pragma) (cpp_reader *, source_location); int (*valid_pch) (cpp_reader *, const char *, int); void (*read_pch) (cpp_reader *, const char *, int, const char *); missing_header_cb missing_header; @@ -501,8 +501,8 @@ struct cpp_callbacks /* Callbacks for when a macro is expanded, or tested (whether defined or not at the time) in #ifdef, #ifndef or "defined". */ - void (*used_define) (cpp_reader *, unsigned int, cpp_hashnode *); - void (*used_undef) (cpp_reader *, unsigned int, cpp_hashnode *); + void (*used_define) (cpp_reader *, source_location, cpp_hashnode *); + void (*used_undef) (cpp_reader *, source_location, cpp_hashnode *); /* Called before #define and #undef or other macro definition changes are processed. */ void (*before_define) (cpp_reader *); |