You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Ben Laurie <be...@gonzo.ben.algroup.co.uk> on 1997/01/07 22:56:09 UTC

Re: IRIX 5.3 warning

Chuck Murcko wrote:
> 
> I believe this is the same one Dean reported with IRIX 6.2.
> 
>         cc -c -Iregex  -O2 -DIRIX -DSTATUS   util.c
> cfe: Warning 851: util.c, line 109: constant initializer expression is invalid (refers to automatic variables).
>      struct tm gmt = *gmtime(&tt);
> 
> This is SGI cc.

I don't understand this error. What does it mean? For starters, where's the
constant???

Cheers,

Ben.

-- 
Ben Laurie                Phone: +44 (181) 994 6435  Email: ben@algroup.co.uk
Freelance Consultant and  Fax:   +44 (181) 994 6472
Technical Director        URL: http://www.algroup.co.uk/Apache-SSL
A.L. Digital Ltd,         Apache Group member (http://www.apache.org)
London, England.          Apache-SSL author

Re: IRIX 5.3 warning

Posted by Dean Gaudet <dg...@arctic.org>.
"struct tm gmt" is a structure, and it is being initialized in an auto
declaration block.  I *think* ANSI requires such initializations (of
structures, not scalars) to be compile-time constant (but I haven't
bothered to look).  That's why I think the compiler is generating the
warning.

Dean

On Tue, 7 Jan 1997, Ben Laurie wrote:

> Chuck Murcko wrote:
> > 
> > I believe this is the same one Dean reported with IRIX 6.2.
> > 
> >         cc -c -Iregex  -O2 -DIRIX -DSTATUS   util.c
> > cfe: Warning 851: util.c, line 109: constant initializer expression is invalid (refers to automatic variables).
> >      struct tm gmt = *gmtime(&tt);
> > 
> > This is SGI cc.
> 
> I don't understand this error. What does it mean? For starters, where's the
> constant???
> 
> Cheers,
> 
> Ben.
> 
> -- 
> Ben Laurie                Phone: +44 (181) 994 6435  Email: ben@algroup.co.uk
> Freelance Consultant and  Fax:   +44 (181) 994 6472
> Technical Director        URL: http://www.algroup.co.uk/Apache-SSL
> A.L. Digital Ltd,         Apache Group member (http://www.apache.org)
> London, England.          Apache-SSL author
>