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] |
In_Assertion_Expr should be non-zero during analysis of assertion expressions, even for preanalysis of these expressions. So wrap the call to Preanalyze_Spec_Expression to provide proper increment/decrement of the flag for assertion expressions. Tested on x86_64-pc-linux-gnu, committed on trunk 2012-10-01 Yannick Moy <moy@adacore.com> * sem_ch13.adb (Add_Invariants): Analyze the invariant expression as an assertion expression. * sem_ch3.adb / sem_ch3.ads (Preanalyze_Assert_Expression): New procedure that wraps a call to Preanalyze_Spec_Expression for assertion expressions, so that In_Assertion_Expr can be properly adjusted. * sem_prag.adb (Analyze_PPC_In_Decl_Part Check_Precondition_Postcondition Preanalyze_CTC_Args): Call the new Preanalyze_Assert_Expression.
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] |