This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
This patch removes some duplicate entries for an expression function that is the completion of a previous function declaration. The following commonds: gcc -c -gnat12 p.adb grep greater p.ali must yield: 2V13*greater{boolean} 2>22 2>25 2|2b13 package P is function greater (X, Y : integer) return Boolean; function equal (x, Y: Boolean) return Boolean is (X or Y); end P; --- package body P is function greater (X, Y : integer) return Boolean is (X > Y); function incr (x : integer) return integer is (X+1); end P; Tested on x86_64-pc-linux-gnu, committed on trunk 2012-02-22 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb (Analyze_Expression_Function): If the construct is a completion, indicate that its formals are the formals of a completion, and as such do not get a cross- reference entry. (Analyze_Subprogram_Specification): Do not generate a definition for the entity of an expression function, because it may be a completion. Definition will be generated if needed when analyzing the generated subprogram declaration.
Attachment:
difs
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |