Commit b191a125 by Arnaud Charlet

[multiple changes]

2011-08-02  Vincent Celier  <celier@adacore.com>

	* adaint.c (file_names_case_sensitive_cache): New static int.
	(__gnat_get_file_names_case_sensitive): Cache the return value in
	file_names_case_sensitive_cache at the first invocation, to avoid
	multiple calls to getenv.

2011-08-02  Bob Duff  <duff@adacore.com>

	* sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.

From-SVN: r177189
parent 316a0661
2011-08-02 Vincent Celier <celier@adacore.com>
* adaint.c (file_names_case_sensitive_cache): New static int.
(__gnat_get_file_names_case_sensitive): Cache the return value in
file_names_case_sensitive_cache at the first invocation, to avoid
multiple calls to getenv.
2011-08-02 Bob Duff <duff@adacore.com>
* sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
2011-08-02 Yannick Moy <moy@adacore.com>
* sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
......
......@@ -592,21 +592,27 @@ __gnat_get_maximum_file_name_length (void)
/* Return nonzero if file names are case sensitive. */
static int file_names_case_sensitive_cache = -1;
int
__gnat_get_file_names_case_sensitive (void)
{
if (file_names_case_sensitive_cache == -1)
{
const char *sensitive = getenv ("GNAT_FILE_NAME_CASE_SENSITIVE");
if (sensitive != NULL
&& (sensitive[0] == '0' || sensitive[0] == '1')
&& sensitive[1] == '\0')
return sensitive[0] - '0';
file_names_case_sensitive_cache = sensitive[0] - '0';
else
#if defined (VMS) || defined (WINNT) || defined (__APPLE__)
return 0;
file_names_case_sensitive_cache = 0;
#else
return 1;
file_names_case_sensitive_cache = 1;
#endif
}
return file_names_case_sensitive_cache;
}
/* Return nonzero if environment variables are case sensitive. */
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2010, Free Software Foundation, Inc. --
-- Copyright (C) 1992-2011, 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- --
......@@ -9835,17 +9835,15 @@ package body Sem_Ch12 is
end if;
end if;
-- Perform atomic/volatile checks (RM C.6(12))
-- Perform atomic/volatile checks (RM C.6(12)). Note that AI05-0218-1
-- removes the second instance of the phrase "or allow pass by copy".
if Is_Atomic (Act_T) and then not Is_Atomic (Ancestor) then
Error_Msg_N
("cannot have atomic actual type for non-atomic formal type",
Actual);
elsif Is_Volatile (Act_T)
and then not Is_Volatile (Ancestor)
and then Is_By_Reference_Type (Ancestor)
then
elsif Is_Volatile (Act_T) and then not Is_Volatile (Ancestor) then
Error_Msg_N
("cannot have volatile actual type for non-volatile formal type",
Actual);
......
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