[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: CVS update: subversion/subversion/include svn_delta.h

From: Greg Stein <gstein_at_lyra.org>
Date: 2001-03-02 02:01:03 CET

On Thu, Mar 01, 2001 at 05:37:27PM -0600, Sam TH wrote:
> On Thu, Mar 01, 2001 at 02:53:13PM -0600, Karl Fogel wrote:
> > Ben Collins-Sussman <sussman@newton.ch.collab.net> writes:
> > > Oh, I just meant that if we ever change the definition of a struct,
> > > your static initialization would more likely break, compared to
> > > palloc'ing it.
> >
> > Well, if the definition of the struct changes, anyone constructing one
> > by hand will often have to compensate. I don't think that's affected
> > by whether it's allocated on the stack or in the heap. (In fact,
> > maybe the static initialization will generate a compiler warning if
> > not all fields are present? That would be nice.)

Gotta hope for type conflicts, actually.

But I agree that people will simply need to compensate. No biggy in my book.

> gcc, at least, generates such warnings.

Euh... it shouldn't generate a warning. Omitting fields at the end of a
structure is defined by ANSI C to set those fields to 0.

Is gcc warning for auto struct initializers, but not for globals?

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
Received on Sat Oct 21 14:36:24 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.