Gentoo Archives: gentoo-user

From: Todd Goodman <tsg@×××××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Strange GCC behavior
Date: Thu, 29 Sep 2011 17:45:25
Message-Id: 20110929174354.GF8126@ns1.bonedaddy.net
In Reply to: [gentoo-user] Strange GCC behavior by Nilesh Govindarajan
1 * Nilesh Govindarajan <contact@××××××××.com> [110929 13:33]:
2 > Default function arguments in C are specified like this:
3 >
4 > int func(int a = 10) {} // just a dummy function
5
6 No they're not. C doesn't have default function arguments.
7
8 >
9 > Now I save that in a file called foo.c
10 >
11 > The above piece of code is valid in C as well as C++
12
13 Uh, no it's not.
14
15 >
16 > Why is this happening? O_o
17
18 Because it's not correct C.
19
20 Todd

Replies

Subject Author
Re: [gentoo-user] Strange GCC behavior Michael Mol <mikemol@×××××.com>
Re: [gentoo-user] Strange GCC behavior Nilesh Govindarajan <contact@××××××××.com>