diff options
author | Neil Booth <neil@daikokuya.demon.co.uk> | 2001-08-05 21:31:30 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2001-08-05 21:31:30 +0000 |
commit | 6604e6f38d99e2e38f997d3ddb56a8fef06818b2 (patch) | |
tree | ba4516faab4daa3b5f2b20d3f9b83a34c0baede5 /gcc/line-map.h | |
parent | 67821e3a9e007c34a85bbc3b934031b57eafc903 (diff) | |
download | gcc-6604e6f38d99e2e38f997d3ddb56a8fef06818b2.tar.gz |
re PR preprocessor/3824 (With -traditional, CPP 0xffffffff > 0 but C 0xffffffff < 0)
PR preprocessor/3824
* line-map.c: Update comments.
* line-map.h: Update comments.
* tradcif.y: Don't consider large numbers unsigned.
* gcc.dg/cpp/tr-sign.c: New testcase.
From-SVN: r44651
Diffstat (limited to 'gcc/line-map.h')
-rw-r--r-- | gcc/line-map.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/line-map.h b/gcc/line-map.h index b6c934435d3..bbc6caacd5a 100644 --- a/gcc/line-map.h +++ b/gcc/line-map.h @@ -44,7 +44,11 @@ struct line_maps unsigned int used; }; -/* Reason for adding a line change with add_line_map (). */ +/* Reason for adding a line change with add_line_map (). LC_ENTER is + when including a new file, e.g. a #include directive in C. + LC_LEAVE is when reaching a file's end. LC_RENAME is when a file + name or line number changes for neither of the above reasons + (e.g. a #line directive in C). */ enum lc_reason {LC_ENTER = 0, LC_LEAVE, LC_RENAME}; /* Initialize a line map set. */ @@ -56,7 +60,7 @@ extern void free_line_maps PARAMS ((struct line_maps *)); /* Add a mapping of logical source line to physical source file and - line number. Ther text pointed to by TO_FILE must have a lifetime + line number. The text pointed to by TO_FILE must have a lifetime at least as long as the final call to lookup_line (). FROM_LINE should be monotonic increasing across calls to this @@ -80,7 +84,8 @@ extern struct line_map *lookup_line /* Non-zero if the map is at the bottom of the include stack. */ #define MAIN_FILE_P(MAP) ((MAP)->included_from < 0) -/* The current line map. */ +/* The current line map. Saves a call to lookup_line if the caller is + sure he is in the scope of the current map. */ #define CURRENT_LINE_MAP(MAPS) ((MAPS)->maps + (MAPS)->used - 1) #endif /* !GCC_LINE_MAP_H */ |