summaryrefslogtreecommitdiff
path: root/gcc/ada/exp_ch6.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-02-06 10:23:17 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-02-06 10:23:17 +0000
commitaf3a42766db6d6c7033a23003fa15a40f222027b (patch)
tree3955586656957f515e4adc2d438b580f8a827213 /gcc/ada/exp_ch6.adb
parent84004385c9c362cf41b39d46e7576bf10a2d4894 (diff)
downloadgcc-af3a42766db6d6c7033a23003fa15a40f222027b.tar.gz
2014-02-06 Robert Dewar <dewar@adacore.com>
* casing.adb (Determine_Casing): Consider SPARK_Mode to be mixed case. 2014-02-06 Ed Schonberg <schonberg@adacore.com> * exp_ch6.adb (Is_Build_In_Place_Function): Predicate is false when the function has a foreign convention, but not if only the limited return type has such a convention. 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com> * sem_ch3.adb (Handle_Late_Controlled_Primitive): Remove local variable Spec. Comment reformatting. Use Copy_Separate_Tree rather than New_Copy_Tree when building the corresponding subprogram declaration. 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com> * sem_prag.adb (Analyze_Global_Item): Remove the mode-related checks on abstract states with enabled external properties. (Property_Error): Removed. 2014-02-06 Javier Miranda <miranda@adacore.com> * lib-xref.adb (Generate_Reference): When generating the reference to the first private entity take care of handling swapped entities. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207547 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_ch6.adb')
-rw-r--r--gcc/ada/exp_ch6.adb12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb
index 556bfe08b15..39085843ae5 100644
--- a/gcc/ada/exp_ch6.adb
+++ b/gcc/ada/exp_ch6.adb
@@ -9592,13 +9592,13 @@ package body Exp_Ch6 is
or else (Ekind (E) = E_Subprogram_Type
and then Etype (E) /= Standard_Void_Type)
then
- -- Note: If you have Convention (C) on an inherently limited type,
- -- you're on your own. That is, the C code will have to be carefully
- -- written to know about the Ada conventions.
+ -- Note: If the function has a foreign convention, it cannot build
+ -- its result in place, so you're on your own. On the other hand,
+ -- if only the return type has a foreign convention, its layout is
+ -- intended to be compatible with the other language, but the build-
+ -- in place machinery can ensure that the object is not copied.
- if Has_Foreign_Convention (E)
- or else Has_Foreign_Convention (Etype (E))
- then
+ if Has_Foreign_Convention (E) then
return False;
-- In Ada 2005 all functions with an inherently limited return type