On Tue, 2014-07-29 at 21:13 +0200, Marek Polacek wrote:
> On Tue, Jul 29, 2014 at 02:58:03PM -0400, David Malcolm wrote:
> > This is possibly a dumb question, but what happens for a static local,
> > rather than an auto local? e.g.
> > 
> > int *f (void)
> > {
> >     static int i;
> >     return &i;
> > }
> 
> This is fine.  The variable i has a static storage duration, so is allocated
> when the program begins and is deallocated when the program ends.  There's 
> only
> one instance of the variable i. 
Sorry, by "what happens" I meant, "is a warning emitted?", and I see
Marc has answered that.

Reply via email to