summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-04-14 14:48:28 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2019-11-28 17:53:38 +0100
commit42c0e6472186dc4aa7151756eb02f073b766ec38 (patch)
tree3460c0d50de9b950db3ef9a477cdf60ffa0428ec
parent95a2a27f2c461007b00aab6d39c6d5c0631e1a73 (diff)
downloadsparse-42c0e6472186dc4aa7151756eb02f073b766ec38.tar.gz
alt definition for STANDARD_GNU89 & friends
It may be useful to known the base standard and if we're using the gnu extensions but as these are defined it can only be done on a case-by-case basis. Change these defines so that: * the GNU extensions is the least significant bit * the versions can be easily compared with <, >, <= and >= Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rw-r--r--lib.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib.h b/lib.h
index 1eb45561..7958359c 100644
--- a/lib.h
+++ b/lib.h
@@ -225,13 +225,16 @@ enum {
extern int arch_cmodel;
enum standard {
+ STANDARD_NONE,
+ STANDARD_GNU,
STANDARD_C89,
+ STANDARD_GNU89 = STANDARD_C89 | STANDARD_GNU,
STANDARD_C94,
+ STANDARD_GNU94 = STANDARD_C94 | STANDARD_GNU,
STANDARD_C99,
+ STANDARD_GNU99 = STANDARD_C99 | STANDARD_GNU,
STANDARD_C11,
- STANDARD_GNU11,
- STANDARD_GNU89,
- STANDARD_GNU99,
+ STANDARD_GNU11 = STANDARD_C11 | STANDARD_GNU,
};
extern enum standard standard;