[Bug target/12477] Request to add ability to disable inline/dllimport warnings
dannysmith at users dot sourceforge dot net
gcc-bugzilla@gcc.gnu.org
Sun Aug 27 21:15:00 GMT 2006
------- Comment #14 from dannysmith at users dot sourceforge dot net 2006-08-27 21:14 -------
(In reply to comment #12)
> This happens with Qt4 Win32 as well - lot of warnings - "warning: inline
> function... attribute ignored". All that's needed is a -Wno-inline-dllimport
> type of flag to mingw to suppress these warnings.
This is current (gcc-4.2) behaviour.
What exactly is wrong with using -Wno-attributes to suppress the warnings.
Danny
========================================================================
// warn-inline-dllimport.c
__declspec (dllimport) void f1();
// inline definition (silently) overides earlier dllimport declaration
inline void f1() {}
// inline && dllimport in definition emits warning
// both can't be true.
inline __declspec (dllimport) void f2 () {}
void b()
{
f1();
f2();
}
========================================================================
compiling as:
gcc -Wall -c warn-inline-dllimport.c
produces:
warn-inline-dllimport.c:8: warning: inline function 'f2' declared as dllimport:
attribute ignored
compiling as:
gcc -Wall -Wno-attributes -c warn-inline-dllimport.c
gets rid of the attribute warning
--
dannysmith at users dot sourceforge dot net changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12477
More information about the Gcc-bugs
mailing list