From: Arnaud Giersch Date: Fri, 3 Feb 2012 13:53:53 +0000 (+0100) Subject: Don't use reserved keywords. X-Git-Tag: exp_20120216~67^2 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/ec63b14f8fcd0a88515e4260e00c41b77c0274cc?hp=6929a75e852513610503d5c01bf928e1331e0d43 Don't use reserved keywords. "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. --- diff --git a/include/xbt/automaton.h b/include/xbt/automaton.h index f140ed2e82..33acf99398 100644 --- a/include/xbt/automaton.h +++ b/include/xbt/automaton.h @@ -28,7 +28,9 @@ typedef struct xbt_automaton { 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;