diff options
author | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-02-17 10:26:44 +0000 |
---|---|---|
committer | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-02-17 10:26:44 +0000 |
commit | ac6c481d5734d0aea887d1d598da10dc2c9910cd (patch) | |
tree | 7d919ed17c492831b64a4b11a496099612b303e7 /gcc/emit-rtl.c | |
parent | f357ade313c8efcea5787f9143e2794a56a6be36 (diff) | |
download | gcc-ac6c481d5734d0aea887d1d598da10dc2c9910cd.tar.gz |
* rtl.h (force_line_numbers, restore_line_number_status): Declare.
* emit-rtl.c (force_line_numbers, restore_line_number_status):
New functions.
* stmt.c (struct nesting): Replace seenlabel with line_number_status.
(expand_start_case): Adjust to this change.
(check_seenlabel): New function.
(pushcase, pushcase_range, expand_endcase): Use it.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@18031 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r-- | gcc/emit-rtl.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 739ca53fde1..3da217ced04 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -3457,3 +3457,25 @@ init_emit_once (line_numbers) pic_offset_table_rtx = gen_rtx_REG (Pmode, PIC_OFFSET_TABLE_REGNUM); #endif } + +/* Query and clear/ restore no_line_numbers. This is used by the + switch / case handling in stmt.c to give proper line numbers in + warnings about unreachable code. */ + +int +force_line_numbers () +{ + int old = no_line_numbers; + + no_line_numbers = 0; + if (old) + force_next_line_note (); + return old; +} + +void +restore_line_number_status (old_value) + int old_value; +{ + no_line_numbers = old_value; +} |