Re: [ng-spice-devel] Building ng-spice with Microsoft Visual C++ for Windows
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: