From: <no...@so...> - 2002-06-29 05:09:05
|
Bugs item #575286, was opened at 2002-06-28 22:09 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=575286&group_id=2435 Category: gcc Group: Known bugs Status: Open Resolution: None Priority: 5 Submitted By: Jacob Abrams (symphon5) Assigned to: Danny Smith (dannysmith) Summary: dllimport bug Initial Comment: The following code sample produces a nasty error in the GCC C++ 3.1 compiler for mingw (dunno about other platforms), no idea how to fix it: #include <windows.h> void _declspec(dllimport) Install(); void _declspec(dllimport) Remove(); void Install() { Remove(); } void Remove() { } Here's the compiler output: C:\mingw\dev>gcc -c -v -save-temps dllproblem.cpp Reading specs from C:/MINGW/BIN/../lib/gcc- lib/mingw32/3.1/specs Configured with: ../gcc/configure --with-gcc --with-gnu-ld -- with-gnu-as --host=mingw32 --target=mingw32 -- prefix=/mingw --enable-threads --disable-nls --enable- languages=f77,c++,objc,ada --disable-win32-registry -- disable-shared Thread model: win32 gcc version 3.1 C:\MINGW\BIN\..\lib\gcc-lib\mingw32\3.1\cpp0.exe -lang- c++ -D__GNUG__=3 -D__DEPRECATED -D__EXCEPTIONS - D__GXX_ABI_VERSION=100 -v -iprefix C:\MINGW\BIN\../lib/gcc-lib/mingw32/3.1/ -D__GNUC__=3 - D__GNUC_MINOR__=1 -D__GNUC_PATCHLEVEL__=0 -D_WIN32 - D__WIN32 -D__WIN32__ -DWIN32 -D__MINGW32__ - D__MSVCRT__ -DWINNT -D_X86_=1 -D_WIN32 -D__WIN32 - D__WIN32__ -D__WIN32__ -D__MINGW32__ -D__MSVCRT__ - D__WINNT__ -D_X86_=1 -D__WIN32 -D__WINNT - Asystem=winnt -D__NO_INLINE__ -D__STDC_HOSTED__=1 - remap -Acpu=i386 -Amachine=i386 -Di386 -D__i386 - D__i386__ -D__tune_i586__ -D__tune_pentium__ - D__stdcall=__attribute__((__stdcall__)) -D__cdecl=__attribute__ ((__cdecl__)) -D__fastcall=__attribute__((__fastcall__)) - D_stdcall=__attribute__((__stdcall__)) -D_cdecl=__attribute__ ((__cdecl__)) -D_fastcall=__attribute__((__fastcall__)) - D__declspec(x)=__attribute__((x)) dllproblem.cpp dllproblem.ii GNU CPP version 3.1 (cpplib) (80386, BSD syntax) ignoring nonexistent directory "/usr/local/mingw32/include" #include "..." search starts here: #include <...> search starts here: C:/MINGW/include/g++-v3 C:/MINGW/include/g++-v3/mingw32 C:/MINGW/include/g++-v3/backward C:/MINGW/include C:/MINGW/lib/gcc-lib/mingw32/3.1/include C:/MINGW/mingw32/include /mingw/include/g++-v3 /mingw/include/g++-v3/mingw32 /mingw/include/g++-v3/backward /mingw/include /mingw/include /mingw/lib/gcc-lib/mingw32/3.1/include /mingw/mingw32/include End of search list. C:\MINGW\BIN\..\lib\gcc-lib\mingw32\3.1\cc1plus.exe - fpreprocessed dllproblem.ii -quiet -dumpbase dllproblem.cpp -version -o dllproblem.s GNU CPP version 3.1 (cpplib) (80386, BSD syntax) GNU C++ version 3.1 (mingw32) compiled by GNU C version 3.1. dllproblem.cpp: In function `void Remove()': dllproblem.cpp:13: Internal compiler error in rest_of_compilation, at toplev.c: 3478 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=575286&group_id=2435 |
From: <no...@so...> - 2002-07-31 09:25:17
|
Bugs item #575286, was opened at 2002-06-29 17:09 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=575286&group_id=2435 Category: gcc Group: Known bugs >Status: Closed >Resolution: Wont Fix Priority: 5 Submitted By: Jacob Abrams (symphon5) Assigned to: Danny Smith (dannysmith) Summary: dllimport bug Initial Comment: The following code sample produces a nasty error in the GCC C++ 3.1 compiler for mingw (dunno about other platforms), no idea how to fix it: #include <windows.h> void _declspec(dllimport) Install(); void _declspec(dllimport) Remove(); void Install() { Remove(); } void Remove() { } Here's the compiler output: C:\mingw\dev>gcc -c -v -save-temps dllproblem.cpp Reading specs from C:/MINGW/BIN/../lib/gcc- lib/mingw32/3.1/specs Configured with: ../gcc/configure --with-gcc --with-gnu-ld -- with-gnu-as --host=mingw32 --target=mingw32 -- prefix=/mingw --enable-threads --disable-nls --enable- languages=f77,c++,objc,ada --disable-win32-registry -- disable-shared Thread model: win32 gcc version 3.1 C:\MINGW\BIN\..\lib\gcc-lib\mingw32\3.1\cpp0.exe -lang- c++ -D__GNUG__=3 -D__DEPRECATED -D__EXCEPTIONS - D__GXX_ABI_VERSION=100 -v -iprefix C:\MINGW\BIN\../lib/gcc-lib/mingw32/3.1/ -D__GNUC__=3 - D__GNUC_MINOR__=1 -D__GNUC_PATCHLEVEL__=0 -D_WIN32 - D__WIN32 -D__WIN32__ -DWIN32 -D__MINGW32__ - D__MSVCRT__ -DWINNT -D_X86_=1 -D_WIN32 -D__WIN32 - D__WIN32__ -D__WIN32__ -D__MINGW32__ -D__MSVCRT__ - D__WINNT__ -D_X86_=1 -D__WIN32 -D__WINNT - Asystem=winnt -D__NO_INLINE__ -D__STDC_HOSTED__=1 - remap -Acpu=i386 -Amachine=i386 -Di386 -D__i386 - D__i386__ -D__tune_i586__ -D__tune_pentium__ - D__stdcall=__attribute__((__stdcall__)) -D__cdecl=__attribute__ ((__cdecl__)) -D__fastcall=__attribute__((__fastcall__)) - D_stdcall=__attribute__((__stdcall__)) -D_cdecl=__attribute__ ((__cdecl__)) -D_fastcall=__attribute__((__fastcall__)) - D__declspec(x)=__attribute__((x)) dllproblem.cpp dllproblem.ii GNU CPP version 3.1 (cpplib) (80386, BSD syntax) ignoring nonexistent directory "/usr/local/mingw32/include" #include "..." search starts here: #include <...> search starts here: C:/MINGW/include/g++-v3 C:/MINGW/include/g++-v3/mingw32 C:/MINGW/include/g++-v3/backward C:/MINGW/include C:/MINGW/lib/gcc-lib/mingw32/3.1/include C:/MINGW/mingw32/include /mingw/include/g++-v3 /mingw/include/g++-v3/mingw32 /mingw/include/g++-v3/backward /mingw/include /mingw/include /mingw/lib/gcc-lib/mingw32/3.1/include /mingw/mingw32/include End of search list. C:\MINGW\BIN\..\lib\gcc-lib\mingw32\3.1\cc1plus.exe - fpreprocessed dllproblem.ii -quiet -dumpbase dllproblem.cpp -version -o dllproblem.s GNU CPP version 3.1 (cpplib) (80386, BSD syntax) GNU C++ version 3.1 (mingw32) compiled by GNU C version 3.1. dllproblem.cpp: In function `void Remove()': dllproblem.cpp:13: Internal compiler error in rest_of_compilation, at toplev.c: 3478 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions. ---------------------------------------------------------------------- >Comment By: Danny Smith (dannysmith) Date: 2002-07-31 21:25 Message: Logged In: YES user_id=11494 If you want this fixed, best to follow the instructions at :http://www.gnu.org/software/gcc/bugs.html The code does compile in C, but produces nonsense object (just as it did with 2.95.3). _Remove is defined, but there is an undefined reference to __imp__Remove The function definitions should of course override the inconsistent dllimport attribute, but doesn't for Remove. It looks like once a function is used, its attributes stick. Danny ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=575286&group_id=2435 |