This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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



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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]