Commit 86b43436 by Eric Botcazou

lang.opt (funsigned-char): New option.

	* gcc-interface/lang.opt (funsigned-char): New option.
	* gcc-interface/misc.c (gnat_handle_option): Accept it.
	* gcc-interface/utils.c (finish_character_type): Tweak comment.

From-SVN: r262629
parent bdaa2c54
2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/lang.opt (funsigned-char): New option.
* gcc-interface/misc.c (gnat_handle_option): Accept it.
* gcc-interface/utils.c (finish_character_type): Tweak comment.
2018-07-07 Eric Botcazou <ebotcazou@adacore.com> 2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity): Add GNAT_DECL local * gcc-interface/decl.c (gnat_to_gnu_entity): Add GNAT_DECL local
...@@ -2351,7 +2357,7 @@ ...@@ -2351,7 +2357,7 @@
2018-05-21 Jerome Lambourg <lambourg@adacore.com> 2018-05-21 Jerome Lambourg <lambourg@adacore.com>
* gcc-interface/Makefile.in: Add g-soliop__qnx.ads to the runtime build * gcc-interface/Makefile.in: Add g-soliop__qnx.ads to the runtime build
for QNX. for QNX.
2018-05-21 Hristian Kirtchev <kirtchev@adacore.com> 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
......
...@@ -80,6 +80,10 @@ fsigned-char ...@@ -80,6 +80,10 @@ fsigned-char
Ada AdaWhy AdaSCIL Ada AdaWhy AdaSCIL
Make \"char\" signed by default. Make \"char\" signed by default.
funsigned-char
Ada AdaWhy AdaSCIL
Make \"char\" unsigned by default.
gant gant
Ada AdaWhy AdaSCIL Driver Joined Undocumented RejectNegative Ada AdaWhy AdaSCIL Driver Joined Undocumented RejectNegative
Catch typos. Catch typos.
......
...@@ -170,6 +170,7 @@ gnat_handle_option (size_t scode, const char *arg, int value, int kind, ...@@ -170,6 +170,7 @@ gnat_handle_option (size_t scode, const char *arg, int value, int kind,
case OPT_fshort_enums: case OPT_fshort_enums:
case OPT_fsigned_char: case OPT_fsigned_char:
case OPT_funsigned_char:
/* These are handled by the middle-end. */ /* These are handled by the middle-end. */
break; break;
......
...@@ -1684,7 +1684,7 @@ record_builtin_type (const char *name, tree type, bool artificial_p) ...@@ -1684,7 +1684,7 @@ record_builtin_type (const char *name, tree type, bool artificial_p)
integral types are unsigned. integral types are unsigned.
Unfortunately the signedness of 'char' in C is implementation-defined Unfortunately the signedness of 'char' in C is implementation-defined
and GCC even has the option -fsigned-char to toggle it at run time. and GCC even has the option -f{un}signed-char to toggle it at run time.
Since GNAT's philosophy is to be compatible with C by default, to wit Since GNAT's philosophy is to be compatible with C by default, to wit
Interfaces.C.char is defined as a mere copy of Character, we may need Interfaces.C.char is defined as a mere copy of Character, we may need
to declare character types as signed types in GENERIC and generate the to declare character types as signed types in GENERIC and generate the
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment