From: Eran I. <era...@gm...> - 2012-05-21 20:59:52
|
On Mon, May 21, 2012 at 9:21 PM, niXman <i.n...@gm...> wrote: > Hello list! > > I am the creator of the MinGW-builds project. > Today, looking through the list of commits in the CodeLite trunk, I > found this strange comment: >> 5552 | 26 hours | eranif | fixed macros abuse by ctags (showed only with mingw-builds projects 4.7.0) > > I was a little upset to see an unjustified accusation of my project ;) > I actually accused ctags project and not MinGW-w64 ;) > The fact is that the symbols beginning with underscores are reserved. > > ISO/IEC 9899:1999 Standard, 7.1.3: >> — All identifiers that begin with an underscore and either an uppercase letter or another >> underscore are always reserved for any use. >> >> — All identifiers that begin with an underscore are always reserved for use as identifiers >> with file scope in both the ordinary and tag name spaces. > > ISO/IEC 14882 Standard, 17.4.3.1.2: >> — Each name that contains a double underscore (_ _) or begins with an underscore >> followed by an uppercase letter (2.11) is reserved to the implementation for any use. >> >> — Each name that begins with an underscore is reserved to the implementation for >> use as a name in the global namespace. > > ISO/IEC 9899:201x Standard, 7.1.3: >> — All identifiers that begin with an underscore and either an uppercase letter or another >> underscore are always reserved for any use. >> >> — All identifiers that begin with an underscore are always reserved for use as identifiers >> with file scope in both the ordinary and tag name spaces. > > Builds provided by my project use the project mingw-w64[1] as a CRT & > WINAPI, which, in > essence, is the only implementation of the CRT & WINAPI for MinGW-x86_64. > In fact, CRT & WINAPI provided by the project MinGW-w64, are used for both > x86_32, and for x86_64 platforms. > From this it follows that when trying to build CodeLite for x86_64 > platform, you will inevitably > use the MinGW build, which uses the MinGW-w64 project as a CRT & WINAPI. > And as a result, you will sooner or later face the conflict of the > __unused__ macro, anyway ;) > And this is why I fixed ctags (if you will check the diff of that commit...) > I say all this to that: > 1) the developers of MinGW-w64 came in accordance with the standard. > 2) the developers of libctags violated the standard. > > Thus neither of my builds, nor the developers of MinGW-w64 are not > guilty of this situation. > We (at least me) are not pointing any fingers, I am just trying to fix a given situation > Thanks! > Just an FYI: Another project that does not compile with MinGW-w64 is "astyle" (a very popular source code formatter, which is also used by codelite IDE). But this time I suspect that it is a case of wrong macros defined somewhere in MinGW-w64 In the official MInGW builds / TDM GCC the mcros __MINGW32_MAJOR_VERSION and __MINGW32_MINOR_VERSION are defined in _mingw.h and their values are 3 and 20 respectively. However, building astyle with MinGW-w64 causes this pre-processor error to stop the build: #if defined(__MINGW32__) #if (__MINGW32_MAJOR_VERSION > 3) || ((__MINGW32_MAJOR_VERSION == 3) && (__MINGW32_MINOR_VERSION < 16)) #error - Use MinGW compiler version 4 or higher #endif #endif So maybe you can check this one out as well? > > > [1] http://sourceforge.net/projects/mingw-w64/ > > > -- > Regards, > niXman > ___________________________________________________ > Dual-target(i686/x86_64) MinGW compiler for i686/x86_64 hosts: > http://sourceforge.net/projects/mingwbuilds/ > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Codelite-developers mailing list > Cod...@li... > https://lists.sourceforge.net/lists/listinfo/codelite-developers -- Eran Ifrah Author of the cross platform, open source C++ IDE: http://www.codelite.org YTubePlayer http://www.ytubeplayer.com |