lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] PATCH: tests build fixes for clang


From: Vadim Zeitlin
Subject: [lmi] PATCH: tests build fixes for clang
Date: Sun, 7 Mar 2021 14:10:50 +0100

 Hello again,

 I'd like to submit a series of small fixes to the tests allowing to build
them with clang, please see https://github.com/let-me-illustrate/lmi/pull/173

 The commit messages in this PR should hopefully be clear enough, but
please let me know if you have any questions or disagree with anything
there. And if the fixes seem acceptable, it would be great if they could be
merged to allow me running the test suite with clang without having to
apply these fixes first.


 One thing I did _not_ do, although I think it would be worth doing, was to
define LMI_GCC and LMI_CLANG macros in config.hpp. The reason I'd like to
do this is that the number of occurrences of

        #if defined __GNUC__ && !defined __clang__

tests increases from 4 to 10 with this PR and it risks continuing growing
in the future, so I'd prefer to write this as shorter and clearer

        #if defined LMI_GCC

instead. If you agree that it would be a good idea, please let me know and
I'll add a commit doing this to this PR (or create another PR with it, as
you prefer).

 Just for completeness, another possibility I've considered was to define
the existing LMI_GCC_VERSION only for "genuine" gcc, but I don't think it's
a good idea because:

1. The existing uses of LMI_GCC_VERSION should be removed[*] in the first
   place as they're very obsolete (some check for gcc 3.2!).

2. Checking LMI_GCC_VERSION would be less clear than checking LMI_GCC IMO.

 Thanks in advance for looking at this!
VZ

[*] Of course, as usual, please let me know if you'd like me to make a PR
    actually removing them.

Attachment: pgpazkxMvWONS.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]