[ lame-Bugs-3480692 ] mingw-w64 compilation error

SourceForge.net <[email protected]>
Newsgroups gmane.comp.audio.mp3.lame
Message-ID <[email protected]>
Bugs item #3480692, was opened at 2012-01-27 17:49
Message generated for change (Tracker Item Submitted) made by nu774
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=100290&aid=3480692&group_id=290

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: configure/Makefiles
Group: Portability
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: nu774 (nu774)
Assigned to: Nobody/Anonymous (nobody)
Summary: mingw-w64 compilation error

Initial Comment:
mingw-w64 compilation result in the following error. (I tried to cross compile on Linux box).

> vbrquantize.c:122:1: error: multiple storage classes in declaration specifiers
> vbrquantize.c:153:1: error: multiple storage classes in declaration specifiers
> vbrquantize.c:176:1: error: multiple storage classes in declaration specifiers
> vbrquantize.c:198:1: error: multiple storage classes in declaration specifiers
> vbrquantize.c:206:1: error: multiple storage classes in declaration specifiers

This is caused by FORCEINLINE macro, which seems to be in use only inside of vbrquantize.c.
"FORCEINLINE" is heavily used in MS Windows SDK headers, thus also in mingw headers.
By Windows SDK header definition, FORCEINLINE is evaluated to "__inline" (for non- MSVC compiler).
Then, by mingw-w64 header definition (_mingw.h), "__inline" is evaluated to 
"extern __inline__ __attribute__((__always_inline__,__gnu_inline__))"

Final declaration of the functions causing error are like the following:

extern __inline__ __attribute__((__always_inline__,__gnu_inline__)) static float
vec_max_c(const float * xr34, unsigned int bw)

Thus, storage class "extern" and "static" conflicts, and is causing compilation error.
If it is not intentional, please don't use macro name "FORCEINLINE".


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=100290&aid=3480692&group_id=290

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.