issue-#208 ASSERT(FALSE) rejected by compiler

issue-#208 ASSERT(FALSE) rejected by compiler

Postby Robert » Mon Jun 15, 2020 5:07 pm

The Language Report permits ASSERT(x) where x is a Boolean expression, so the compiler should be adjusted to match the report.
For the issue see https://redmine.blackboxframework.org/issues/208 .

Different languages in the Oberon familly have different semantics, including our current compiler behaviour.
In my opinion:
1 - Our compiler should match our language report.
2 - The other semantic alternatives do not offer sufficient advantage to justify changing our report.

So we should update our compiler. This is a minor change, as described in https://community.blackboxframework.org ... f=48&t=246 (see post dated 10-June-2020).
User avatar
Robert
 
Posts: 1023
Joined: Sat Sep 28, 2013 11:04 am
Location: Edinburgh, Scotland

Re: issue-#208 ASSERT(FALSE) rejected by compiler

Postby Josef Templ » Sat Jun 20, 2020 6:29 am

I do agree that ASSERT(FALSE) should not be reported by the compiler but at runtime.
If this is in line with Oberon-07 it is a good sign that it is the right choice and it eliminates a difference.

The compile time evaluation of asserts is driven by the desire to catch as many errors as possible
at compile time but it is too aggressive in this case, I think.

- Josef
User avatar
Josef Templ
 
Posts: 2038
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#208 ASSERT(FALSE) rejected by compiler

Postby Josef Templ » Tue Jun 23, 2020 5:33 am

I have prepared a fix as proposed by luowy.

Here is the link to the diffs: https://redmine.blackboxframework.org/p ... 83f2387960

@luowy: I have added assertfn to the documentation of the syntax tree structure in DevCPT, please check.
User avatar
Josef Templ
 
Posts: 2038
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#208 ASSERT(FALSE) rejected by compiler

Postby luowy » Wed Jun 24, 2020 6:44 am

no problem,very well:the comments and documents updated correctly;
luowy
 
Posts: 226
Joined: Mon Oct 20, 2014 12:52 pm


Return to Resolved (Bugs)

Who is online

Users browsing this forum: No registered users and 1 guest

cron