diff options
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r-- | gcc/toplev.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c index 29ae065..e2efecd 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -819,6 +819,13 @@ check_global_declarations (tree *vec, int len) { decl = vec[i]; + /* Do not emit debug information about variables that are in + static storage, but not defined. */ + if (TREE_CODE (decl) == VAR_DECL + && TREE_STATIC (decl) + && !TREE_ASM_WRITTEN (decl)) + DECL_IGNORED_P (decl) = 1; + /* Warn about any function declared static but not defined. We don't warn about variables, |