chicken-janitors
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-janitors] #1258: At higher optimization levels, some scruti


From: Chicken Trac
Subject: Re: [Chicken-janitors] #1258: At higher optimization levels, some scrutiny warnings disappear
Date: Tue, 28 Feb 2017 19:34:47 -0000

#1258: At higher optimization levels, some scrutiny warnings disappear
------------------------------------+--------------------
            Reporter:  sjamaan      |      Owner:
                Type:  defect       |     Status:  new
            Priority:  major        |  Milestone:  5.0
           Component:  scrutinizer  |    Version:  4.10.x
          Resolution:               |   Keywords:
Estimated difficulty:  hard         |
------------------------------------+--------------------

Comment (by sjamaan):

 As pointed out by TheLemonMan, this is caused by the rewrite for {{{>}}}
 that was introduced by c493d5100. The diff is:

 {{{
 -   ((number number) (##core#inline "C_i_greaterp" #(1) #(2))))
 +   ((* *) (##core#inline "C_i_greaterp" #(1) #(2))))
 }}}

 Apparently the rewrite happens so early that the scrutinizer has no
 opportunity to detect that the argument to {{{sort}}} is wrong.

 The rewrite itself seems correct to me, because it is more efficient than
 rewriting only numbers, if the compiler doesn't know the types
 ({{{C_i_greaterp}}} will raise a runtime error if it is passed non-
 numbers).

--
Ticket URL: <https://bugs.call-cc.org/ticket/1258#comment:2>
CHICKEN Scheme <https://www.call-cc.org/>
CHICKEN Scheme is a compiler for the Scheme programming language.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]