octave-maintainers
[Top][All Lists]
Advanced

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

warnings shut off in ov.cc?


From: Rik
Subject: warnings shut off in ov.cc?
Date: Tue, 15 Oct 2019 11:21:52 -0700

jwe,

Can you try the attached patch which implements a warning when non-scalar
arguments are used with the colon operator?  Everything looks correct, and
the printf debugging that I started using when I got confused shows that
the code is executing, but no warnings are printed.  The code is exactly
the same format as the warning for complex values using in colon
expressions, however that warning fires.  Is there something that disables
warnings temporarily in the interpreter when calling operators?

Sample session:

1:[3,4]
running do_colon_op
Got here
Got here2
ans =

   1   2   3

whereas

octave:1> 1:3*i
running do_colon_op
warning: imaginary part of complex colon arguments is ignored
ans = [](1x0)

Maybe this is a red herring, but occasionally warnings seem to be turned
off for the complex code path as well.

octave:2> 1:(3i)
running do_colon_op
ans = [](1x0)

The last example should also have produced a warning.

--Rik

Attachment: warncolon.patch
Description: Text Data


reply via email to

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