From: "H.Yamamoto" Date: 2004-09-14T01:21:07+09:00 Subject: Re: [PATCH] dir.c --- Dir.chdir error handling nobu.nokada@softhome.net wrote: (2004/09/14 01:07) >Hi, > >At Mon, 13 Sep 2004 16:54:06 +0900, >H.Yamamoto wrote in [ruby-core:03384]: >> Probably former because there is difference in type of arguments >> between prototype and implementation. >> (Maybe this is allowed in C, but I could not find document to confirm. >> At least C++ fails.) > >The latter. VALUEs are not pointers, so difference in >qualifiers is OK, even in C++. Actually, it is disallowed only >when the dereferenced qualifiers conflict. Umm, my bcc32 may be broken. // f.cpp extern int foo(int); int main() { return foo(32); } // g.cpp int foo(volatile int x) { x; return x; } // result R:\>g++ f.cpp g.cpp -o f.exe R:\>bcc32 f.cpp g.cpp Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland f.cpp: g.cpp: Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland Error: 外部シンボル 'foo(int)' が未解決(R:\F.OBJ が参照)