diff options
author | dalej <dalej@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-08-06 23:36:22 +0000 |
---|---|---|
committer | dalej <dalej@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-08-06 23:36:22 +0000 |
commit | 2222b3c62cd0deb2c26a41562e8a81e0314c789b (patch) | |
tree | 3ecabcec22dac5b68ecff720a8e42a6ed6a73862 /gcc/c-common.c | |
parent | ff2b6cf59f2ebadea8f19b854bbaee2dd163d8f1 (diff) | |
download | gcc-2222b3c62cd0deb2c26a41562e8a81e0314c789b.tar.gz |
Mark __func__ with line number 0, to avoid confusing debuggers.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56081 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r-- | gcc/c-common.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index 363e72f949d..fabc1813904 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -1102,6 +1102,13 @@ fname_decl (rid, id) if (!decl) { tree saved_last_tree = last_tree; + /* If a tree is built here, it would normally have the lineno of + the current statement. Later this tree will be moved to the + beginning of the function and this line number will be wrong. + To avoid this problem set the lineno to 0 here; that prevents + it from appearing in the RTL. */ + int saved_lineno = lineno; + lineno = 0; decl = (*make_fname_decl) (id, fname_vars[ix].pretty); if (last_tree != saved_last_tree) @@ -1117,6 +1124,7 @@ fname_decl (rid, id) saved_function_name_decls); } *fname_vars[ix].decl = decl; + lineno = saved_lineno; } if (!ix && !current_function_decl) pedwarn_with_decl (decl, "`%s' is not defined outside of function scope"); |