CVS g++ new warning [-Winline -Werror -O1]

Mark Mitchell
Thu Mar 9 08:52:00 GMT 2000

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.

  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         
CodeSourcery, LLC     

More information about the Gcc-patches mailing list