News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Commit 11895 fails detecting Clang

Started by Miguel Gimenez, November 04, 2019, 12:27:35 PM

Previous topic - Next topic

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:


#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


will never detect it. The code should be


#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


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...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]