From c624298a19aa42cc335c33b980a17da2bbd7fb94 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Fri, 18 Jul 2014 12:09:31 +0200 Subject: [multiple changes] 2014-07-18 Robert Dewar * sem_util.adb (Check_Expression_Against_Static_Predicate): Mark expression as non-static if it fails static predicate check, and issue additional warning. 2014-07-18 Pascal Obry * a-witeio.adb (Put): Control translation based on wide_text_translation_required. * adaint.c (CurrentCCSEncoding): New variable. * initialize.c (__gnat_initialize): On Windows initialize CurrentCCSEncoding based on values in GNAT_CCS_ENCODING environment variable. * mingw32.h (CurrentCCSEncoding): New external. (__gnat_wide_text_translation_required): Likewise. * sysdep.c (wide_text_translation_required): New variable. (__gnat_set_wide_text_mode): Set mode based on CurrentCCSEncoding. 2014-07-18 Hristian Kirtchev * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global variable Refined_States. Add global variable Matched_Items. (Check_Dependency_Clause): Account for dependency clauses utilizing states with visible null refinements. (Is_Null_Refined_State): New routine. (Match_Items): Record each successfully matched item of pragma Depends. (Record_Item): New routine. 2014-07-18 Ed Schonberg * sem_attr.adb (Analyze_Attribute, case 'Update): Set Do_Range_Check flag on a dynamic index expression used in a component association in the argument of Update. 2014-07-18 Gary Dismukes * einfo.ads, sem_eval.ads, sem_ch13.adb: Minor reformatting. 2014-07-18 Hristian Kirtchev * exp_ch6.adb (Expand_Simple_Function_Return): Redo the marking of enclosing blocks, loops and the enclosing function using a parent-based traversal. * exp_util.adb (Wrap_Statements_In_Block): Suppress the secondary stack reclamation if the iterator loop contains a return statement that uses the stack. * sem_ch5.adb (Analyze_Loop_Statement): There is no need to patch up the scope stack as the secondary stack management now takes into account the enclosing function of the iterator loop. From-SVN: r212805 --- gcc/ada/initialize.c | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) (limited to 'gcc/ada/initialize.c') diff --git a/gcc/ada/initialize.c b/gcc/ada/initialize.c index 00c4d04..1aba5fd 100644 --- a/gcc/ada/initialize.c +++ b/gcc/ada/initialize.c @@ -6,7 +6,7 @@ * * * C Implementation File * * * - * Copyright (C) 1992-2012, Free Software Foundation, Inc. * + * Copyright (C) 1992-2014, Free Software Foundation, Inc. * * * * GNAT is free software; you can redistribute it and/or modify it under * * terms of the GNU General Public License as published by the Free Soft- * @@ -52,6 +52,7 @@ #endif #include "raise.h" +#include #ifdef __cplusplus extern "C" { @@ -151,6 +152,39 @@ __gnat_initialize (void *eh ATTRIBUTE_UNUSED) } } + /* Set current encoding for the IO. */ + { + char *ccsencoding = getenv ("GNAT_CCS_ENCODING"); + + /* Default CCS Encoding. */ + CurrentCCSEncoding = _O_TEXT; + __gnat_wide_text_translation_required = 0; + + if (ccsencoding != NULL) + { + if (strcmp (ccsencoding, "U16TEXT") == 0) + { + CurrentCCSEncoding = _O_U16TEXT; + __gnat_wide_text_translation_required = 1; + } + else if (strcmp (ccsencoding, "TEXT") == 0) + { + CurrentCCSEncoding = _O_TEXT; + __gnat_wide_text_translation_required = 0; + } + else if (strcmp (ccsencoding, "WTEXT") == 0) + { + CurrentCCSEncoding = _O_WTEXT; + __gnat_wide_text_translation_required = 1; + } + else if (strcmp (ccsencoding, "U8TEXT") == 0) + { + CurrentCCSEncoding = _O_U8TEXT; + __gnat_wide_text_translation_required = 1; + } + } + } + /* Adjust gnat_argv to support Unicode characters. */ { LPWSTR *wargv; -- cgit v1.1