From d0c4107b0e02c31acb062de829c6d104cb6918df Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Wed, 21 May 2008 11:42:51 -0400 Subject: PR6538: fix treatment of initialized globals --- elaborate.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'elaborate.cxx') diff --git a/elaborate.cxx b/elaborate.cxx index f8bfabdb..26786c00 100644 --- a/elaborate.cxx +++ b/elaborate.cxx @@ -1683,7 +1683,8 @@ void semantic_pass_opt2 (systemtap_session& s, bool& relaxed_p) } else { - if (vut.written.find (l) == vut.written.end()) + if (vut.written.find (l) == vut.written.end() && + ! l->init) // no initializer if (! s.suppress_warnings) clog << "WARNING: read-only global variable " << *l->tok << endl; i++; -- cgit