Rename --{,un}sigend-chars to -f{,un}signed-char and document them in the manpage.
authorChristoph Mallon <christoph.mallon@gmx.de>
Mon, 15 Dec 2008 23:43:04 +0000 (23:43 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Mon, 15 Dec 2008 23:43:04 +0000 (23:43 +0000)
[r24700]

cparser.1
main.c

index 5fa58cd..4a2040d 100644 (file)
--- a/cparser.1
+++ b/cparser.1
@@ -1,5 +1,5 @@
 .\" Please adjust this date whenever revising the manpage.
-.Dd December 15, 2008
+.Dd December 16, 2008
 .Dt CPARSER 1
 .Sh NAME
 .Nm cparser
@@ -255,6 +255,16 @@ and
 .Cm UTF-8
 (default).
 Case is ignored.
+.It Fl fsigned-char
+Define
+.Sq char
+to have the same range, representation and behaviour as
+.Sq signed char .
+.It Fl funsigned-char
+Define
+.Sq char
+to have the same range, representation and behaviour as
+.Sq unsigned char .
 .It Fl b Ar option
 Set a backend option.
 Use
diff --git a/main.c b/main.c
index d6cba01..4b51df5 100644 (file)
--- a/main.c
+++ b/main.c
@@ -845,12 +845,16 @@ int main(int argc, char **argv)
                                        } else if (streq(opt, "short-wchar")) {
                                                wchar_atomic_kind = truth_value ? ATOMIC_TYPE_USHORT
                                                        : ATOMIC_TYPE_INT;
+                                       } else if (streq(opt, "signed-char")) {
+                                               char_is_signed = truth_value;
                                        } else if (streq(opt, "syntax-only")) {
                                                mode = truth_value ? ParseOnly : CompileAssembleLink;
                                        } else if (streq(opt, "omit-frame-pointer")) {
                                                set_be_option(truth_value ? "omitfp" : "omitfp=no");
                                        } else if (streq(opt, "strength-reduce")) {
                                                firm_option(truth_value ? "strength-red" : "no-strength-red");
+                                       } else if (streq(opt, "unsigned-char")) {
+                                               char_is_signed = !truth_value;
                                        } else if (streq(opt, "fast-math")               ||
                                                   streq(opt, "jump-tables")             ||
                                                   streq(opt, "unroll-loops")            ||
@@ -1017,10 +1021,6 @@ int main(int argc, char **argv)
                                } else if (streq(option, "no-ms")) {
                                        features_on  &= ~_MS;
                                        features_off |=  _MS;
-                               } else if (streq(option, "signed-chars")) {
-                                       char_is_signed = true;
-                               } else if (streq(option, "unsigned-chars")) {
-                                       char_is_signed = false;
                                } else if (streq(option, "strict")) {
                                        strict_mode = true;
                                } else if (streq(option, "lextest")) {