ilto:richard.guent...@gmail.com]
> Sent: 31 March 2009 15:32
> To: Bingfeng Mei
> Cc: gcc@gcc.gnu.org
> Subject: Re: gcc99 inlining rules
>
> On Tue, Mar 31, 2009 at 4:24 PM, Bingfeng Mei
> wrote:
> > Hello,
> > I found the following code doesn't compile
On Tue, 31 Mar 2009, Bingfeng Mei wrote:
> Hello,
> I found the following code doesn't compile with gcc4.4. and -std=c99.
> Does this behaviour conform to standard?
It does compile. It may or may not link depending on compilation options,
since you are missing an external definition for foo,
On Tue, Mar 31, 2009 at 4:24 PM, Bingfeng Mei wrote:
> Hello,
> I found the following code doesn't compile with gcc4.4. and -std=c99. Does
> this behaviour conform to standard?
>
> inline int foo(){
> return 10;
> }
>
> int main(int argc, char **argv){
> return foo();
> }
It works for me. Wha
Hello,
I found the following code doesn't compile with gcc4.4. and -std=c99. Does this
behaviour conform to standard?
inline int foo(){
return 10;
}
int main(int argc, char **argv){
return foo();
}
I goolged the c99 inlining rule as follows. They does't seem to say such code
cannot be