From 3b8a094dafdeea5499239adadaf24d2b8bdb1f76 Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Tue, 30 Dec 2014 17:10:43 +0100 Subject: PR#6: fix handling of wchar_t and assignments from wide string literals. - cparser/Machine indicates whether wchar_t is signed or not (it is signed int in Linux and BSD, but unsigned short in Win32) - The type of a wide string literal is "wchar_t *" if the typedef "wchar_t" exists in the environment (e.g. after #include ). Only if wchar_t is not defined do we use the default from Machine. - Permit initialization of any integer array from a wide string literal, not just an array of wchar_t. --- cparser/Cutil.mli | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cparser/Cutil.mli') diff --git a/cparser/Cutil.mli b/cparser/Cutil.mli index 0de0c827..309981be 100644 --- a/cparser/Cutil.mli +++ b/cparser/Cutil.mli @@ -153,7 +153,7 @@ val ptrdiff_t_ikind : ikind (* Helpers for type-checking *) -val type_of_constant : constant -> typ +val type_of_constant : Env.t -> constant -> typ (* Return the type of the given constant. *) val type_of_member : Env.t -> field -> typ (* Return the type of accessing the given field [fld]. -- cgit