Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Don't use reserved keywords.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Fri, 3 Feb 2012 13:53:53 +0000 (14:53 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Fri, 3 Feb 2012 13:59:14 +0000 (14:59 +0100)
"or", "and", and "not" are reserved keywords in C++, and this line
breaks compilation of C++ code.

Since the literal constants defined here are never used, comment their
definition, and simply declare the field as an int.

include/xbt/automaton.h

index f140ed2..33acf99 100644 (file)
@@ -28,7 +28,9 @@ typedef struct xbt_automaton {
 typedef struct xbt_automaton* xbt_automaton_t;
 
 typedef struct xbt_exp_label{
 typedef struct xbt_automaton* xbt_automaton_t;
 
 typedef struct xbt_exp_label{
-  enum{or=0, and=1, not=2, predicat=3, one=4} type;
+  /* fixme: "or", "and", and "not" are reserved keywords in C++ */
+  /* enum{or=0, and=1, not=2, predicat=3, one=4} type; */
+  int type;
   union{
     struct{
       struct xbt_exp_label* left_exp;
   union{
     struct{
       struct xbt_exp_label* left_exp;