This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: CVS g++ new warning [-Winline -Werror -O1]
- To: nathan at codesourcery dot com
- Subject: Re: CVS g++ new warning [-Winline -Werror -O1]
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Thu, 09 Mar 2000 09:00:06 -0800
- Cc: bkoz at cygnus dot com, gcc-patches at gcc dot gnu dot org
- Organization: CodeSourcery, LLC
- References: <200003090613.WAA01502@haight.constant.com><20000308224448P.mitchell@codesourcery.com><38C7D42D.168B7C3F@codesourcery.com>
Nathan --
I'm not sure your patch is correct. Aren't the static variables
that are created as flags for initializing local statics going to be
marked as DECL_ARTIFICIAL? Or do they end up outside the function?
I'm not sure I understand your other comments. It would seem to me
that maybe_commonize_var should be run before inlining; how does
inlining have an impact here? For example,
static inline void f () { static int i; }
Here, `i' doesn't get commonized, because `f' has internal linkage.
Then:
static void g() { f(): }
I don't think we want `i' to get commonized in `g', right? I think
there's already machinery that makes us ignore statics when inlining
-- either at the inlining stage or at the RTL creation stage.
Am I being dense again?
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com