[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: x86_64 segmentation fault due to forgotten extern directive

Geert Fannes

3/10/2005 8:08:00 AM

Why does this cause a problem when extern is omitted? Is there some
standard return type C assumes when extern is not present?

>Normal, on 32 bit machine sizeof(int) == sizeof(unsigned long).
>This is not the case on x86_64
>
>Guy Decoux



2 Answers

ts

3/10/2005 9:20:00 AM

0

>>>>> "G" == Geert Fannes <Geert.Fannes@ikanconsulting.com> writes:

G> Why does this cause a problem when extern is omitted? Is there some
G> standard return type C assumes when extern is not present?

Yes, without declaration the return type is assumed to be int.

When you declare it 'extern VALUE localFunction()' it has the right return
type (unsigned long).


Guy Decoux





kangarooistan

2/12/2008 8:58:00 AM

0

snip