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]


>>>>> Richard Henderson <rth@cygnus.com> writes:

 > On Thu, Mar 09, 2000 at 10:24:45AM -0800, Jason Merrill wrote:
 >>  > 2) Platforms supporting common linkage can emit a needed static var
 >>  > defn and still inline the function.
 >> 
 >> We currently suppress inlining for all targets if there's a static
 >> variable, because that's simpler than getting the semantics right.  I've
 >> forgotten the bug that led me to that conclusion...

 > Static variables can't be common.  If you make it global, how
 > do you choose a unique name for it?

We qualify it with the name of the function.  Though it occurs to me that
multiple static locals in different blocks with the same name would end up
with the same symbol under the current scheme...

Jason

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