Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] [vdr] Re: ANNOUNCE: Softdevice plugin. Use /dev/fb for output



At Dienstag, 25. November 2003 19:21 Bud Millwood wrote:
> On Tuesday 25 November 2003 18:37, you wrote:
> > It's a common programming fault that older Compilers tolerate. GCC 3.2
> > does NOT.
> >
> > Just remove any assignments of default values out of the implementation
> > (i.e.: in the .h file you may write
> > bool xyz(int parm = 100);
> > in the .c[pp] file you must write
> > bool xyz(int parm) {...}
> > but not
> > bool xyz(int parm = 100) {...}
> > )
>
> I recall making that mistake a few years back and the result being that
> the default value was *always* passed in, regardless of what the caller
> passed. Can't recall if it was GCC or VC++.

You mean, the default is always passed in if the default is _not_  specified 
twice?? That can only have been a compiler bug :-)

With gcc, the suggested way should always work (also in older versions), and 
it's a fact that newer gcc's depend on the default not being specified 
twice...

Anyway, specifying the default twice only creates more possible errors (as 
you have two values you can misspell while typing *g*)

Greetings,
Sascha


-- 
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.



-- 
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index