bug-gnulib
[Top][All Lists]
Advanced

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

improve clang support (40)


From: Bruno Haible
Subject: improve clang support (40)
Date: Sun, 16 Aug 2020 19:09:30 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-186-generic; KDE/5.18.0; x86_64; ; )

clang support #warning.


2020-08-16  Bruno Haible  <bruno@clisp.org>

        argp: Emit a warning also with clang.
        * lib/argp-help.c (__argp_short_program_name): Use #warning also on
        clang.

diff --git a/lib/argp-help.c b/lib/argp-help.c
index 9c95c16..80be8c8 100644
--- a/lib/argp-help.c
+++ b/lib/argp-help.c
@@ -1722,7 +1722,7 @@ __argp_short_program_name (void)
   /* FIXME: What now? Miles suggests that it is better to use NULL,
      but currently the value is passed on directly to fputs_unlocked,
      so that requires more changes. */
-# if __GNUC__
+# if __GNUC__ || (__clang_major__ >= 4)
 #  warning No reasonable value to return
 # endif /* __GNUC__ */
   return "";




reply via email to

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