Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Commit 11895 fails detecting Clang

(1/1)

Miguel Gimenez:
Commit 11895 applied the changes proposed in ticket 870, but inverted the test order making Clang undetectable. Clang also defines __GNUC__, so the code in the commit:


--- Code: ---#if defined (__GNUC__)
                                            + _T(" - gcc ") + (wxString() << __GNUC__)
                                            + _T(".")       + (wxString() << __GNUC_MINOR__)
                                            + _T(".")       + (wxString() << __GNUC_PATCHLEVEL__)
#elif defined (__clang__)
                                            + _T(" - clang ")  + (wxString() << __clang_major__)
                                            + _T(".")          + (wxString() << __clang_minor__)
                                            + _T(".")          + (wxString() << __clang_patchlevel__)
#endif

--- End code ---

will never detect it. The code should be


--- Code: ---#if defined (__clang__)
                                            + _T(" - clang ")  + (wxString() << __clang_major__)
                                            + _T(".")          + (wxString() << __clang_minor__)
                                            + _T(".")          + (wxString() << __clang_patchlevel__)
#elif defined (__GNUC__)
                                            + _T(" - gcc ") + (wxString() << __GNUC__)
                                            + _T(".")       + (wxString() << __GNUC_MINOR__)
                                            + _T(".")       + (wxString() << __GNUC_PATCHLEVEL__)
#endif

--- End code ---

See https://sourceforge.net/p/codeblocks/tickets/870/#5424 onwards for more information

oBFusCATed:
I have a fix for this... and all the other places which had to be modified...

Navigation

[0] Message Index

Go to full version