Re: [ng-spice-devel] Building ng-spice with Microsoft Visual C++ for Windows


To ng-spice-devel@ieee.ing.uniroma1.it
From Al Davis <aldavis@ieee.org>
Date Thu, 19 Apr 2001 13:15:41 -0700
Delivered-To mailing list ng-spice-devel@ieee.ing.uniroma1.it
In-Reply-To <CF654D964573D311A1CA0090278A36FF4CBE34@EDIN_EXM1 >
Mailing-List contact ng-spice-devel-help@ieee.ing.uniroma1.it; run by ezmlm
References <CF654D964573D311A1CA0090278A36FF4CBE34@EDIN_EXM1 >
Reply-To ng-spice-devel@ieee.ing.uniroma1.it

On Thu, 19 Apr 2001, Gillespie, Alan wrote:
> Jon wrote :
> > By the way, what's going on with the following lines that
> > show up in all of
> > the device xxxInit.c files?  Visual C++ can't handle them.  Are
> > they standard C syntax, or do I need to use some special compiler
> > option. DEVparam      : VSRCparam,
> >     DEVmodParam   : NULL,
> >     DEVload       : VSRCload,...
> >
> > For now, I'm changing this to:
> > VSRCparam,
> > NULL,
> > VSRCload
> > Because I don't know what purpose the other syntax serves.
>
> Does anyone have an answer for him ? I'd be interested
> to find out.

That is named initializers.  It is a non-standard extension in gcc.

The best way to handle this is to revert to the old portable code, 
where you must list all the initializers in order and without gaps.

<rant>

It seems that all compilers deviate from the standard language in 
some way.  Please stick to the standard language.  It makes it so 
much easier for everyone.  At least gcc documents that it is a 
non-standard extension, which should be interpreted as a notice 
"don't use this if you expect it to be portable".

If the non-standard extension really provides useful extra 
functionality, provide a work-around so it will compile and run 
without it.

Using library functions not in the standard library is not as bad 
because the portable solution is to supply the function.

</rant>

Partial thread listing: