Re: [gentoo-user] Strange GCC behavior

2011-09-29 Thread David W Noon
On Thu, 29 Sep 2011 22:57:25 +0530, Nilesh Govindarajan wrote about [gentoo-user] Strange GCC behavior: > Default function arguments in C are specified like this: > > int func(int a = 10) {} // just a dummy function > > Now I save that in a file called foo.c > > The above piece of code is valid

Re: [gentoo-user] Strange GCC behavior

2011-09-29 Thread Nilesh Govindarajan
On Thu 29 Sep 2011 11:13:54 PM IST, Todd Goodman wrote: > * Nilesh Govindarajan [110929 13:33]: >> Default function arguments in C are specified like this: >> >> int func(int a = 10) {} // just a dummy function > > No they're not. C doesn't have default function arguments. > >> >> Now I save that

Re: [gentoo-user] Strange GCC behavior

2011-09-29 Thread Michael Mol
On Thu, Sep 29, 2011 at 1:43 PM, Todd Goodman wrote: > * Nilesh Govindarajan [110929 13:33]: >> Default function arguments in C are specified like this: >> >> int func(int a = 10) {} // just a dummy function > > No they're not.  C doesn't have default function arguments. That's another problem.

Re: [gentoo-user] Strange GCC behavior

2011-09-29 Thread Nilesh Govindarajan
On Thu 29 Sep 2011 11:10:00 PM IST, Michael Mol wrote: > On Thu, Sep 29, 2011 at 1:27 PM, Nilesh Govindarajan > wrote: >> Default function arguments in C are specified like this: >> >> int func(int a = 10) {} // just a dummy function >> >> Now I save that in a file called foo.c >> >> The above pie

Re: [gentoo-user] Strange GCC behavior

2011-09-29 Thread Todd Goodman
* Nilesh Govindarajan [110929 13:33]: > Default function arguments in C are specified like this: > > int func(int a = 10) {} // just a dummy function No they're not. C doesn't have default function arguments. > > Now I save that in a file called foo.c > > The above piece of code is valid in

Re: [gentoo-user] Strange GCC behavior

2011-09-29 Thread Michael Mol
On Thu, Sep 29, 2011 at 1:27 PM, Nilesh Govindarajan wrote: > Default function arguments in C are specified like this: > > int func(int a = 10) {} // just a dummy function > > Now I save that in a file called foo.c > > The above piece of code is valid in C as well as C++ > > Now see this: > > nile