Re: Empty arguments

2020-05-03 Thread Kacper Gutowski

On Sat, May 02, 2020 at 08:13:17PM -0400, Colin Verrilli wrote:
This next one I'm not sure about. Theoretically, it should give the 
same result as above, but maybe the behavior is different for defined 
functions.

 ↑ (0↑(1 2)(3 4))f¨(0↑(1 2 3)(4 5 6))
0 0 0
 ⎕cr 'f'
z←l f r
z←l,r

The APL2 LRM makes a big deal about each function having a corresponding
"fill function" that is used when the arguments are empty. It's not clear
about what happens with defined functions.


Defined functions are necessarily different as automatically determining 
what the function does and what are its properties is not trivial (and 
not possible in general case); it's a similar problem as with reduction 
of an empty vector.


Figure 20 at page 110 of the Language Reference shows that for 
“defined operations”, the fill function is “Z←R (the identity function)”.  
Note that the description of dyadic each also refers to this this table, 
and the table clearly says to use right identity, which is what your 
example shows happening.


Assertion failure with each of scalar functions on empty arguments with 
prototypes of not matching shapes is certainly a bug, though.



-k



Re: Empty arguments

2020-05-03 Thread Dr . Jürgen Sauermann

  
  
Hi Colin,
  
  thanks, see below...
  
  Best Regards,
  Jürgen

On 5/3/20 2:13 AM, Colin Verrilli
  wrote:


  
  I was playing around with using empty arguments with
functions to see what happens.
This one seems to make sense

      ↑ (0↑(1 2)(3 4)),¨(0↑(1 2 3)(4 5 6))
0 0 0 0 0

  

Yes. The prototype (0 0) of (1 2)(3 4)) and the prototype (0 0 0) of
(1 2 3)(4 5 6) are
being concatenated to form the result.

  
This next one I'm not sure about. Theoretically, it should give
the same result as above, but maybe the behavior is different
for defined functions.
      ↑ (0↑(1 2)(3 4))f¨(0↑(1 2 3)(4 5 6))
0 0 0
      ⎕cr 'f'
z←l f r
z←l,r  

  


  

  The APL2 LRM makes a big deal about each function having a
  corresponding "fill function" that is used when the arguments
  are empty. It's not clear about what happens with defined
  functions. 

  

defined functions (and also non-scalar primitives) handle empty
arguments different
from scalar functions. They have to because otherwise you could not
write a defined
function that handles empty arguments

  


  This one should probably be a length error or something, but I
  get a failure.

      ↑ (0↑(1 2)(3 4))=¨(0↑(1 2 3)(4 5 6))

  

Correct. You now get a length error (SVN 1278).

  
==
Assertion failed: A->same_shape(*B)
in Function:      eval_fill_AB
in file:          ScalarFunction.cc:707

Call stack:


-- Stack trace at ScalarFunction.cc:707

0x43195865 __libc_start_main
0x80973E0  main
0x8200B65   Workspace::immediate_execution(bool)
0x80F1A4D    Command::process_line()
0x80F149E     Command::do_APL_expression(UCS_string&)
0x80F0C25      Command::finish_context()
0x80FAB54       Executable::execute_body() const
0x81B10DD        StateIndicator::run()
0x812CD9C         Prefix::reduce_statements()
0x812C31E          Prefix::reduce_A_F_B_()
0x8101FCC           DerivedFunction::eval_AB(Value_P, Value_P)
0x80C5B26            Bif_OPER1_EACH::eval_ALB(Value_P,
Token&, Value_P)
0x81A2ACC             ScalarFunction::eval_fill_AB(Value_P,
Value_P)
0x80AC487              do_Assert(char const*, char const*, char
const*, int)

  
  
  
  Colin


  




Re: Empty arguments

2020-05-03 Thread Colin Verrilli
Thanks Jurgen and Kacpur for the explanation. Makes sense.
Also thanks to Jurgen for the fix.

Colin

On Sun, May 3, 2020 at 10:18 AM Dr. Jürgen Sauermann <
mail@jürgen-sauermann.de> wrote:

> Hi Colin,
>
> thanks, see below...
>
> Best Regards,
> Jürgen
>
> On 5/3/20 2:13 AM, Colin Verrilli wrote:
>
> I was playing around with using empty arguments with functions to see what
> happens.
> This one seems to make sense
>
>   ↑ (0↑(1 2)(3 4)),¨(0↑(1 2 3)(4 5 6))
> 0 0 0 0 0
>
> Yes. The prototype (0 0) of (1 2)(3 4)) and the prototype (0 0 0) of (1 2
> 3)(4 5 6) are
> being concatenated to form the result.
>
> This next one I'm not sure about. Theoretically, it should give the same
> result as above, but maybe the behavior is different for defined functions.
>   ↑ (0↑(1 2)(3 4))f¨(0↑(1 2 3)(4 5 6))
> 0 0 0
>   ⎕cr 'f'
> z←l f r
> z←l,r
>
> The APL2 LRM makes a big deal about each function having a corresponding
> "fill function" that is used when the arguments are empty. It's not clear
> about what happens with defined functions.
>
> defined functions (and also non-scalar primitives) handle empty arguments
> different
> from scalar functions. They have to because otherwise you could not write
> a defined
> function that handles empty arguments
>
>
> This one should probably be a length error or something, but I get a
> failure.
>
>   ↑ (0↑(1 2)(3 4))=¨(0↑(1 2 3)(4 5 6))
>
> Correct. You now get a length error (*SVN 1278*).
>
>
> ==
> Assertion failed: A->same_shape(*B)
> in Function:  eval_fill_AB
> in file:  ScalarFunction.cc:707
>
> Call stack:
>
> 
> -- Stack trace at ScalarFunction.cc:707
> 
> 0x43195865 __libc_start_main
> 0x80973E0  main
> 0x8200B65   Workspace::immediate_execution(bool)
> 0x80F1A4DCommand::process_line()
> 0x80F149E Command::do_APL_expression(UCS_string&)
> 0x80F0C25  Command::finish_context()
> 0x80FAB54   Executable::execute_body() const
> 0x81B10DDStateIndicator::run()
> 0x812CD9C Prefix::reduce_statements()
> 0x812C31E  Prefix::reduce_A_F_B_()
> 0x8101FCC   DerivedFunction::eval_AB(Value_P, Value_P)
> 0x80C5B26Bif_OPER1_EACH::eval_ALB(Value_P, Token&, Value_P)
> 0x81A2ACC ScalarFunction::eval_fill_AB(Value_P, Value_P)
> 0x80AC487  do_Assert(char const*, char const*, char const*,
> int)
> 
>
> Colin
>
>
>


Re: Slow down, latest updates

2020-05-03 Thread Dr . Jürgen Sauermann

  
  
Hi Bill,
  
  I double-checked all differences between SVN 1273 and the latest
  SVN.
  The only primitive changed was dyadic ∼ (WITHOUT) which is not
  used in your function.
  
  Therefore I assume the change in performance was caused by
  differences
  in ./configure settings or other reasons beyond the source code.
  You could
  send me your current config.h to have a look at.
  
  Best Regards,
  Jürgen
  

On 5/3/20 12:19 AM, Bill Heagy wrote:


  
  On 5/2/20 1:53 PM, Dr. Jürgen Sauermann wrote:
  
  Hi Bill,


I cannot reproduce this.


Did you run *./configure*after updating from SVN? Sometimes
Makefiles slip

through and can cause performance differences that are then
caused by differering

* ./configure* options. I normally use make developwhich turns
many debug

features on which are turned off when using the default
*./configure* options.

  
  
  CXXFLAGS=-Werror=maybe-uninitialized ./configure
  
  
  I tried using "make develop" but couldn't figure out how to get
  the Werror condition to apply.  I've been using "timer" from the
  "timer" workspace to get the timings.
  
  
  It looks as if the problem started at svn 1274, the same one where
  I had to start disabling the warning.
  
  
  

I have changed your benchmark a little to show the time spent:


*∇rr←sol nn;T**

**T←⎕TS**

**n←1↓⍳nn**

**r←,2**

**l:**

**→(nn<(↑n)*2)⍴x**

**r←r,↑n←(~∨⌿0=⊃r|¨⊂n)/n**

**→l**

**x:**

**r←r,1↓n**

**rr←+/r**

**0.001×0 0 0 24 60 60 1000⊥⎕TS-T**

**∇**

**

**  ⊣sol 20**

*


On 5/2/20 6:21 PM, Bill Heagy wrote:

For the last updates, my little test
  program has slowed down by a factor of more than 4, debian 32
  and 64 bit.  (Same updates as the compiler problem appeared, I
  think.)
  
  
  ∇rr←sol nn
  
  n←1↓⍳nn
  
  r←,2
  
  l:
  
  →(nn<(↑n)*2)⍴x
  
  r←r,↑n←(~∨⌿0=⊃r|¨⊂n)/n
  
  →l
  
  x:
  
  r←r,1↓n
  
  rr←+/r
  
  ∇
  
  
  sol 20
  
  
  


  
  


  




New build errors

2020-05-03 Thread Blake McBride
Greetings,

I am doing:

CXXFLAGS="-Wno-maybe-uninitialized -Wno-class-memaccess" ./configure
make

and getting:

[...]
Quad_RVAL.cc: In member function ‘Value_P Quad_RVAL::result_maxdepth(const
Value&)’:
Quad_RVAL.cc:371:22: error: logical not is only applied to the left hand
side of comparison [-Werror=logical-not-parentheses]
if (!B.get_rank() > 1)RANK_ERROR;
  ^
Quad_RVAL.cc:371:8: note: add parentheses around left hand side expression
to silence this warning
if (!B.get_rank() > 1)RANK_ERROR;
^
()
Quad_RVAL.cc:371:22: error: comparison of constant ‘1’ with boolean
expression is always false [-Werror=bool-compare]
if (!B.get_rank() > 1)RANK_ERROR;
~~^~~
At global scope:
cc1plus: error: unrecognized command line option ‘-Wno-class-memaccess’
[-Werror]


[Bug c++/94905] Bogus warning -Werror=maybe-uninitialized

2020-05-03 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94905

Arseny Solokha  changed:

   What|Removed |Added

 CC||asolokha at gmx dot com

--- Comment #3 from Arseny Solokha  ---
The best I've been able to come up with is the following, reduced from APL 1.8:

enum { MAX_RANK = 8 };

struct Shape {
  Shape(int len) { rho[0] = len; }

  Shape(Shape &other) {
for (int r = 0; r < MAX_RANK; ++r)
  rho[r] = other.rho[r];
  }

  Shape insert_axis() const;

  int rho[MAX_RANK];
};

int insert_axis_len;

Shape Shape::insert_axis() const {
  {
Shape ret(insert_axis_len);
return ret;
  }
}

% g++-10.1.0 -O2 -Wall -Werror -c fojcdnsn.cc
fojcdnsn.cc: In member function 'Shape Shape::insert_axis() const':
fojcdnsn.cc:8:27: error: ''target_mem_ref' not supported by
dump_expr' may be used uninitialized in this function
[-Werror=maybe-uninitialized]
8 |   rho[r] = other.rho[r];
  |~~~^

That's with gcc-10.1.0-RC-20200430; I failed to reproduce it at all with gcc 9.
However, without preprocessed source provided by the reporter it's impossible
to tell whether that's the issue in question.

So please, provide a self-contained testcase! It's not even necessary to
minimize it, as in many cases it's easy to do with tools like C-Reduce or newly
emerged C-Vise and can later be done by developers themselves. But without the
testcase developers cannot and likely won't do anything about the issue you
have in the first place.

-- 
You are receiving this mail because:
You reported the bug.


SVN 1278 build failure

2020-05-03 Thread Brian Callahan

Hello --

The follow build error occurred with SVN 1278. OpenBSD/amd64, clang++ as 
compiler.
struct random_data is a glibc extension and either needs to be defined 
in GNU APL for other platforms or not used.


~Brian

c++ -DHAVE_CONFIG_H -I. -I..   -I/usr/local/include -I/usr/X11R6/include 
-Wall -I sql -Werror -I/usr/local/include 
-I/usr/local/include/postgresql    -g -O2 -MT apl-Id.o -MD -MP -MF 
.deps/apl-Id.Tpo -c -o apl-Id.o `test -f 'Id.cc' || echo './'`Id.cc

In file included from Id.cc:47:
./Quad_RVAL.hh:110:23: error: field has incomplete type 'struct random_data'
   struct random_data buf[256];
  ^
./Quad_RVAL.hh:110:11: note: forward declaration of 'random_data'
   struct random_data buf[256];
  ^
In file included from Id.cc:142:
./Id.def:200:1: error: cannot initialize return object of type 'Function 
*' with an lvalue of type 'Quad_RVAL *'

qf( RVAL  , "\xe2\x8e\x95RVAL"   ,  )
^~
Id.cc:137:52: note: expanded from macro 'qf'
#define qf(i, _u, _v) case ID_Quad_ ## i:   return Quad_ ## i::fun;
^~~
:298:1: note: expanded from here
Quad_RVAL
^
2 errors generated.



Re: New build errors

2020-05-03 Thread Dr . Jürgen Sauermann

  
  
Hi Blake,
  
  thanks, fixed in SVN 1279.
  The -Wno-class-memaccess
  seems to be somewhat new and is only
  understood if the compiler also knows  -Wclass-memaccess.

I am currently testing wit g++ 11 and will try to get rid of  -Wclass-memaccess

  Jürgen


On 5/3/20 4:50 PM, Blake McBride wrote:


  
  Greetings,


I am doing:


CXXFLAGS="-Wno-maybe-uninitialized -Wno-class-memaccess"
  ./configure
  make



and getting:

  [...]
  
  Quad_RVAL.cc: In member function ‘Value_P
Quad_RVAL::result_maxdepth(const Value&)’:
Quad_RVAL.cc:371:22: error: logical not is only applied to
the left hand side of comparison
[-Werror=logical-not-parentheses]
    if (!B.get_rank() > 1)            RANK_ERROR;
                      ^
Quad_RVAL.cc:371:8: note: add parentheses around left hand
side _expression_ to silence this warning
    if (!B.get_rank() > 1)            RANK_ERROR;
        ^
        (            )
Quad_RVAL.cc:371:22: error: comparison of constant ‘1’ with
boolean _expression_ is always false [-Werror=bool-compare]
    if (!B.get_rank() > 1)            RANK_ERROR;
        ~~^~~
At global scope:
  

cc1plus: error: unrecognized command line option
  ‘-Wno-class-memaccess’ [-Werror]







  


  




Re: New build errors

2020-05-03 Thread Blake McBride
Builds now.  Thanks!

On Sun, May 3, 2020 at 10:29 AM Dr. Jürgen Sauermann <
mail@jürgen-sauermann.de> wrote:

> Hi Blake,
>
> thanks, fixed in SVN 1279.
> The -Wno-class-memaccess seems to be somewhat new and is only
> understood if the compiler also knows  -Wclass-memaccess.
>
> I am currently testing wit g++ 11 and will try to get rid of
> -Wclass-memaccess
>
> Jürgen
>
>
> On 5/3/20 4:50 PM, Blake McBride wrote:
>
> Greetings,
>
> I am doing:
>
> CXXFLAGS="-Wno-maybe-uninitialized -Wno-class-memaccess" ./configure
> make
>
> and getting:
>
> [...]
> Quad_RVAL.cc: In member function ‘Value_P Quad_RVAL::result_maxdepth(const
> Value&)’:
> Quad_RVAL.cc:371:22: error: logical not is only applied to the left hand
> side of comparison [-Werror=logical-not-parentheses]
> if (!B.get_rank() > 1)RANK_ERROR;
>   ^
> Quad_RVAL.cc:371:8: note: add parentheses around left hand side expression
> to silence this warning
> if (!B.get_rank() > 1)RANK_ERROR;
> ^
> ()
> Quad_RVAL.cc:371:22: error: comparison of constant ‘1’ with boolean
> expression is always false [-Werror=bool-compare]
> if (!B.get_rank() > 1)RANK_ERROR;
> ~~^~~
> At global scope:
> cc1plus: error: unrecognized command line option ‘-Wno-class-memaccess’
> [-Werror]
>
>
>
>
>


Re: New build errors

2020-05-03 Thread Dr . Jürgen Sauermann
Hi all,

the *-Wclass-memaccess*warning should now be gone (*SVN 1280*).

Jürgen


On 5/3/20 5:36 PM, Blake McBride wrote:
> Builds now.  Thanks!
>
> On Sun, May 3, 2020 at 10:29 AM Dr. Jürgen Sauermann
> mailto:mail@j%C3%BCrgen-sauermann.de>> wrote:
>
> Hi Blake,
>
> thanks, fixed in SVN 1279.
> The -Wno-class-memaccess seems to be somewhat new and is only
> understood if the compiler also knows  -Wclass-memaccess.
>
> I am currently testing wit g++ 11 and will try to get rid of 
> -Wclass-memaccess
>
> Jürgen
>
>
> On 5/3/20 4:50 PM, Blake McBride wrote:
>> Greetings,
>>
>> I am doing:
>>
>> CXXFLAGS="-Wno-maybe-uninitialized -Wno-class-memaccess" ./configure
>> make
>>
>> and getting:
>>
>> [...]
>> Quad_RVAL.cc: In member function ‘Value_P
>> Quad_RVAL::result_maxdepth(const Value&)’:
>> Quad_RVAL.cc:371:22: error: logical not is only applied to the
>> left hand side of comparison [-Werror=logical-not-parentheses]
>>     if (!B.get_rank() > 1)            RANK_ERROR;
>>                       ^
>> Quad_RVAL.cc:371:8: note: add parentheses around left hand side
>> expression to silence this warning
>>     if (!B.get_rank() > 1)            RANK_ERROR;
>>         ^
>>         (            )
>> Quad_RVAL.cc:371:22: error: comparison of constant ‘1’ with
>> boolean expression is always false [-Werror=bool-compare]
>>     if (!B.get_rank() > 1)            RANK_ERROR;
>>         ~~^~~
>> At global scope:
>> cc1plus: error: unrecognized command line option
>> ‘-Wno-class-memaccess’ [-Werror]
>>
>>
>>
>




[Bug c++/94905] Bogus warning -Werror=maybe-uninitialized

2020-05-03 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94905

--- Comment #6 from Arseny Solokha  ---
Thank you.

(In reply to Dr. Jürgen Sauermann from comment #5)
> Not sure how I can create a testcase file other than preprocessing or
> minimizing it.

Of course preprocessing is what you've been asked to do. It is stressed in the
bug filing instructions[1].

[1] https://gcc.gnu.org/bugs

-- 
You are receiving this mail because:
You reported the bug.


Re: SVN 1278 build failure

2020-05-03 Thread Dr . Jürgen Sauermann

  
  
Hi Brian,
  
  thanks, Hopefully fixed in SVN 1281.
  
  Best Rgeards,
  Jürgen
  

On 5/3/20 5:16 PM, Brian Callahan
  wrote:

Hello --
  
  
  The follow build error occurred with SVN 1278. OpenBSD/amd64,
  clang++ as compiler.
  
  struct random_data is a glibc extension and either needs to be
  defined in GNU APL for other platforms or not used.
  
  
  ~Brian
  
  
  c++ -DHAVE_CONFIG_H -I. -I..   -I/usr/local/include
  -I/usr/X11R6/include -Wall -I sql -Werror -I/usr/local/include
  -I/usr/local/include/postgresql    -g -O2 -MT apl-Id.o -MD -MP -MF
  .deps/apl-Id.Tpo -c -o apl-Id.o `test -f 'Id.cc' || echo
  './'`Id.cc
  
  In file included from Id.cc:47:
  
  ./Quad_RVAL.hh:110:23: error: field has incomplete type 'struct
  random_data'
  
     struct random_data buf[256];
  
    ^
  
  ./Quad_RVAL.hh:110:11: note: forward declaration of 'random_data'
  
     struct random_data buf[256];
  
    ^
  
  In file included from Id.cc:142:
  
  ./Id.def:200:1: error: cannot initialize return object of type
  'Function *' with an lvalue of type 'Quad_RVAL *'
  
  qf( RVAL  , "\xe2\x8e\x95RVAL"   ,  )
  
  ^~
  
  Id.cc:137:52: note: expanded from macro 'qf'
  
  #define qf(i, _u, _v) case ID_Quad_ ## i:   return Quad_ ##
  i::fun;
  
  ^~~
  
  :298:1: note: expanded from here
  
  Quad_RVAL
  
  ^
  
  2 errors generated.
  
  
  


  




Re: SVN 1278 build failure

2020-05-03 Thread Brian Callahan

Hi Jürgen --

Now I get this.

~Brian

Quad_RVAL.cc:483:6: error: member initializer 'N' does not name a 
non-static data member or base class

 N(8)
 ^~~~
Quad_RVAL.cc:488:12: error: out-of-line definition of 'do_eval_B' does 
not match any declaration in 'Quad_RVAL'

Quad_RVAL::do_eval_B(const Value & B, int depth)
   ^
Quad_RVAL.cc:499:12: error: out-of-line definition of 'eval_AB' does not 
match any declaration in 'Quad_RVAL'

Quad_RVAL::eval_AB(Value_P A, Value_P B)
   ^~~
3 errors generated.

On 2020-05-03 12:50 PM, Dr. Jürgen Sauermann wrote:

Hi Brian,

thanks, Hopefully fixed in *SVN 1281*.

Best Rgeards,
Jürgen


On 5/3/20 5:16 PM, Brian Callahan wrote:

Hello --

The follow build error occurred with SVN 1278. OpenBSD/amd64, clang++ 
as compiler.
struct random_data is a glibc extension and either needs to be 
defined in GNU APL for other platforms or not used.


~Brian

c++ -DHAVE_CONFIG_H -I. -I..   -I/usr/local/include 
-I/usr/X11R6/include -Wall -I sql -Werror -I/usr/local/include 
-I/usr/local/include/postgresql    -g -O2 -MT apl-Id.o -MD -MP -MF 
.deps/apl-Id.Tpo -c -o apl-Id.o `test -f 'Id.cc' || echo './'`Id.cc

In file included from Id.cc:47:
./Quad_RVAL.hh:110:23: error: field has incomplete type 'struct 
random_data'

   struct random_data buf[256];
  ^
./Quad_RVAL.hh:110:11: note: forward declaration of 'random_data'
   struct random_data buf[256];
  ^
In file included from Id.cc:142:
./Id.def:200:1: error: cannot initialize return object of type 
'Function *' with an lvalue of type 'Quad_RVAL *'

qf( RVAL  , "\xe2\x8e\x95RVAL"   ,  )
^~
Id.cc:137:52: note: expanded from macro 'qf'
#define qf(i, _u, _v) case ID_Quad_ ## i:   return Quad_ ## i::fun;
^~~
:298:1: note: expanded from here
Quad_RVAL
^
2 errors generated.








Re: SVN 1278 build failure

2020-05-03 Thread Dr . Jürgen Sauermann

  
  
Hi Brian,
  
  I see. Hopefully SVN
  1282 works
better.

Best Regards,
Jürgen


  
On 5/3/20 7:10 PM, Brian Callahan
  wrote:


  
  Hi Jürgen --

Now I get this.

~Brian

Quad_RVAL.cc:483:6: error: member initializer 'N' does not name
a non-static data member or base class
 N(8)
 ^~~~
Quad_RVAL.cc:488:12: error: out-of-line definition of
'do_eval_B' does not match any declaration in 'Quad_RVAL'
Quad_RVAL::do_eval_B(const Value & B, int depth)
   ^
Quad_RVAL.cc:499:12: error: out-of-line definition of 'eval_AB'
does not match any declaration in 'Quad_RVAL'
Quad_RVAL::eval_AB(Value_P A, Value_P B)
   ^~~
3 errors generated.
  
  On 2020-05-03 12:50 PM, Dr. Jürgen
Sauermann wrote:
  
  

Hi Brian,
  
  thanks, Hopefully fixed in SVN 1281.
  
  Best Rgeards,
  Jürgen
  

On 5/3/20 5:16 PM, Brian Callahan
  wrote:

Hello
  -- 
  
  The follow build error occurred with SVN 1278. OpenBSD/amd64,
  clang++ as compiler. 
  struct random_data is a glibc extension and either needs to be
  defined in GNU APL for other platforms or not used. 
  
  ~Brian 
  
  c++ -DHAVE_CONFIG_H -I. -I..   -I/usr/local/include
  -I/usr/X11R6/include -Wall -I sql -Werror -I/usr/local/include
  -I/usr/local/include/postgresql    -g -O2 -MT apl-Id.o -MD -MP
  -MF .deps/apl-Id.Tpo -c -o apl-Id.o `test -f 'Id.cc' || echo
  './'`Id.cc 
  In file included from Id.cc:47: 
  ./Quad_RVAL.hh:110:23: error: field has incomplete type
  'struct random_data' 
     struct random_data buf[256]; 
    ^ 
  ./Quad_RVAL.hh:110:11: note: forward declaration of
  'random_data' 
     struct random_data buf[256]; 
    ^ 
  In file included from Id.cc:142: 
  ./Id.def:200:1: error: cannot initialize return object of type
  'Function *' with an lvalue of type 'Quad_RVAL *' 
  qf( RVAL  , "\xe2\x8e\x95RVAL"   ,  ) 
  ^~ 
  Id.cc:137:52: note: expanded from macro 'qf' 
  #define qf(i, _u, _v) case ID_Quad_ ## i:   return Quad_ ##
  i::fun; 
  ^~~ 
  :298:1: note: expanded from here 
  Quad_RVAL 
  ^ 
  2 errors generated. 
  
  


  
  


  




Re: SVN 1278 build failure

2020-05-03 Thread Brian Callahan

That works. Thanks!

~Brian

On 2020-05-03 1:29 PM, Dr. Jürgen Sauermann wrote:

Hi Brian,

I see. Hopefully *SVN 1282*works better.

Best Regards,
Jürgen


On 5/3/20 7:10 PM, Brian Callahan wrote:

Hi Jürgen --

Now I get this.

~Brian

Quad_RVAL.cc:483:6: error: member initializer 'N' does not name a 
non-static data member or base class

 N(8)
 ^~~~
Quad_RVAL.cc:488:12: error: out-of-line definition of 'do_eval_B' 
does not match any declaration in 'Quad_RVAL'

Quad_RVAL::do_eval_B(const Value & B, int depth)
   ^
Quad_RVAL.cc:499:12: error: out-of-line definition of 'eval_AB' does 
not match any declaration in 'Quad_RVAL'

Quad_RVAL::eval_AB(Value_P A, Value_P B)
   ^~~
3 errors generated.

On 2020-05-03 12:50 PM, Dr. Jürgen Sauermann wrote:

Hi Brian,

thanks, Hopefully fixed in *SVN 1281*.

Best Rgeards,
Jürgen


On 5/3/20 5:16 PM, Brian Callahan wrote:

Hello --

The follow build error occurred with SVN 1278. OpenBSD/amd64, 
clang++ as compiler.
struct random_data is a glibc extension and either needs to be 
defined in GNU APL for other platforms or not used.


~Brian

c++ -DHAVE_CONFIG_H -I. -I..   -I/usr/local/include 
-I/usr/X11R6/include -Wall -I sql -Werror -I/usr/local/include 
-I/usr/local/include/postgresql    -g -O2 -MT apl-Id.o -MD -MP -MF 
.deps/apl-Id.Tpo -c -o apl-Id.o `test -f 'Id.cc' || echo './'`Id.cc

In file included from Id.cc:47:
./Quad_RVAL.hh:110:23: error: field has incomplete type 'struct 
random_data'

   struct random_data buf[256];
  ^
./Quad_RVAL.hh:110:11: note: forward declaration of 'random_data'
   struct random_data buf[256];
  ^
In file included from Id.cc:142:
./Id.def:200:1: error: cannot initialize return object of type 
'Function *' with an lvalue of type 'Quad_RVAL *'

qf( RVAL  , "\xe2\x8e\x95RVAL"   ,  )
^~
Id.cc:137:52: note: expanded from macro 'qf'
#define qf(i, _u, _v) case ID_Quad_ ## i:   return Quad_ ## i::fun;
^~~
:298:1: note: expanded from here
Quad_RVAL
^
2 errors generated.












Re: Slow down, latest updates

2020-05-03 Thread Bill Heagy
The change from 1273 to 1274 in Shape.hh after about line 65 appears to 
replace a constant with a structure (?I haven't really looked at what 
this all does).  Backing this out from SVN 1282 speeds my test program 
up (and also gets rid of the compiler warning).


On 5/3/20 10:49 AM, Dr. Jürgen Sauermann wrote:

Hi Bill,

I double-checked all differences between SVN 1273 and the latest SVN.
The only primitive changed was dyadic ∼ (WITHOUT) which is not
used in your function.

Therefore I assume the change in performance was caused by differences
in ./configure settings or other reasons beyond the source code. You could
send me your current *config.h*to have a look at.

Best Regards,
Jürgen


On 5/3/20 12:19 AM, Bill Heagy wrote:


On 5/2/20 1:53 PM, Dr. Jürgen Sauermann wrote:

Hi Bill,

I cannot reproduce this.

Did you run *./configure*after updating from SVN? Sometimes Makefiles slip
through and can cause performance differences that are then caused by 
differering

* ./configure* options. I normally use make developwhich turns many debug
features on which are turned off when using the default *./configure* options.


CXXFLAGS=-Werror=maybe-uninitialized ./configure

I tried using "make develop" but couldn't figure out how to get the Werror 
condition to apply.  I've been using "timer" from the "timer" workspace to get 
the timings.


It looks as if the problem started at svn 1274, the same one where I had to 
start disabling the warning.




I have changed your benchmark a little to show the time spent:

*∇rr←sol nn;T**
**T←⎕TS**
**n←1↓⍳nn**
**r←,2**
**l:**
**→(nn<(↑n)*2)⍴x**
**r←r,↑n←(~∨⌿0=⊃r|¨⊂n)/n**
**→l**
**x:**
**r←r,1↓n**
**rr←+/r**
**0.001×0 0 0 24 60 60 1000⊥⎕TS-T**
**∇**
**
**  ⊣sol 20**
*

On 5/2/20 6:21 PM, Bill Heagy wrote:
For the last updates, my little test program has slowed down by a factor of 
more than 4, debian 32 and 64 bit.  (Same updates as the compiler problem 
appeared, I think.)


∇rr←sol nn
n←1↓⍳nn
r←,2
l:
→(nn<(↑n)*2)⍴x
r←r,↑n←(~∨⌿0=⊃r|¨⊂n)/n
→l
x:
r←r,1↓n
rr←+/r
∇

sol 20












[Bug c++/94905] Bogus warning -Werror=maybe-uninitialized

2020-05-03 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94905

Richard Biener  changed:

   What|Removed |Added

 Blocks||24639


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24639
[Bug 24639] [meta-bug] bug to track all Wuninitialized issues
-- 
You are receiving this mail because:
You reported the bug.