Re: [Bug-apl] SVN 839 doesn't compile
Hi, I believe that I fixed most warnings, *SVN 842*. Since there were many warnings and from different sources, I might have overlooked some of them (or introduced new ones). Please keep reporting them. /// Jürgen
Re: [Bug-apl] SVN 839 doesn't compile
Only one error/warning remains, Xtian. make[3]: Entering directory '/home/xtian/gnuapl/src' g++ -DHAVE_CONFIG_H -I. -I..-Werror -Wall -Wno-strict-aliasing -Wno-deprecated-declarations -I/usr/include -I sql-rdynamic -g -O2 -MT apl-StateIndicator.o -MD -MP -MF .deps/apl-StateIndicator.Tpo -c -o apl-StateIndicator.o `test -f 'StateIndicator.cc' || echo './'`StateIndicator.cc In file included from Common.hh:52:0, from Avec.hh:24, from PrintBuffer.hh:24, from Cell.hh:27, from Value.hh:30, from Value.icc:24, from Command.hh:23, from StateIndicator.cc:23: StateIndicator.cc: In member function ‘void StateIndicator::list(std::ostream&, SI_mode) const’: Assert.hh:45:20: error: nonnull argument ‘this’ compared to NULL [-Werror=nonnull-compare] #define Assert(x) if (!(x)) do_Assert(#x, __FUNCTION__, __FILE__, __LINE__) ^ StateIndicator.cc:177:4: note: in expansion of macro ‘Assert’ Assert(this); ^~ cc1plus: all warnings being treated as errors Makefile:2765: recipe for target 'apl-StateIndicator.o' failed make[3]: *** [apl-StateIndicator.o] Error 1 On 2017-01-10 14:54, Juergen Sauermann wrote: Hi, I believe that I fixed most warnings, *SVN 842*. Since there were many warnings and from different sources, I might have overlooked some of them (or introduced new ones). Please keep reporting them. /// Jürgen
Re: [Bug-apl] SVN 839 doesn't compile
Hi Xtian, thanks, SVN 843. /// Jürgen On 01/10/2017 10:09 PM, Christian Robert wrote: Only one error/warning remains, Xtian. make[3]: Entering directory '/home/xtian/gnuapl/src' g++ -DHAVE_CONFIG_H -I. -I.. -Werror -Wall -Wno-strict-aliasing -Wno-deprecated-declarations -I/usr/include -I sql -rdynamic -g -O2 -MT apl-StateIndicator.o -MD -MP -MF .deps/apl-StateIndicator.Tpo -c -o apl-StateIndicator.o `test -f 'StateIndicator.cc' || echo './'`StateIndicator.cc In file included from Common.hh:52:0, from Avec.hh:24, from PrintBuffer.hh:24, from Cell.hh:27, from Value.hh:30, from Value.icc:24, from Command.hh:23, from StateIndicator.cc:23: StateIndicator.cc: In member function ‘void StateIndicator::list(std::ostream&, SI_mode) const’: Assert.hh:45:20: error: nonnull argument ‘this’ compared to NULL [-Werror=nonnull-compare] #define Assert(x) if (!(x)) do_Assert(#x, __FUNCTION__, __FILE__, __LINE__) ^ StateIndicator.cc:177:4: note: in expansion of macro ‘Assert’ Assert(this); ^~ cc1plus: all warnings being treated as errors Makefile:2765: recipe for target 'apl-StateIndicator.o' failed make[3]: *** [apl-StateIndicator.o] Error 1 On 2017-01-10 14:54, Juergen Sauermann wrote: Hi, I believe that I fixed most warnings, *SVN 842*. Since there were many warnings and from different sources, I might have overlooked some of them (or introduced new ones). Please keep reporting them. /// Jürgen
Re: [Bug-apl] SVN 839 doesn't compile
Thank you, Juergen. SVN 843 compiles under gcc 6.3.1. This is the sole remaining error when compiling with clang 3.8.0: clang++ -DHAVE_CONFIG_H -I. -I..-Werror -Wall -Wno-strict-aliasing -Wno-deprecated-declarations -I/usr/include -I sql -I/usr/include -I sql -g -O2 -MT apl-UserFunction_header.o -MD -MP -MF .deps/apl-UserFunction_header.Tpo -c -o apl-UserFunction_header.o `test -f 'UserFunction_header.cc' || echo './'`UserFunction_header.cc Tokenizer.cc:604:42: error: explicitly assigning value of variable of type 'APL_Float' (aka 'double') to itself [-Werror,-Wself-assign] if (!imag_need_float) imag_flt = imag_flt; ^ Tokenizer.cc:637:45: error: explicitly assigning value of variable of type 'APL_Float' (aka 'double') to itself [-Werror,-Wself-assign] if (!imag_need_float) degrees_flt = degrees_flt; ~~~ ^ ~~~ 2 errors generated. On Tue, Jan 10, 2017 at 11:54 AM, Juergen Sauermann wrote: > Hi, > > I believe that I fixed most warnings, *SVN 842*. > > Since there were many warnings and from different sources, I might have > overlooked > some of them (or introduced new ones). Please keep reporting them. > > /// Jürgen > -- "I think as musicians, we have more vision than we credit ourselves for. We should dive into it without reserve, and take the sort of risks it takes to be divisive and impactful. Things have yet to be done." Aaron Fowler Clark "Do not seek to follow in the footsteps of the masters. Seek what they sought." Matsuo Basho "Knowledge speaks; wisdom listens." Jimi Hendrix http://soundcloud.com/davidlamkins http://reverbnation.com/lamkins http://reverbnation.com/lcw http://lamkins-guitar.com/ http://lamkins.net/ http://successful-lisp.com/
Re: [Bug-apl] SVN 839 doesn't compile
Worth noting: There are now no warnings or notes when compiling under gcc 6.3.1. On Tue, Jan 10, 2017 at 3:45 PM, David Lamkins wrote: > Thank you, Juergen. > > SVN 843 compiles under gcc 6.3.1. > > This is the sole remaining error when compiling with clang 3.8.0: > > clang++ -DHAVE_CONFIG_H -I. -I..-Werror -Wall -Wno-strict-aliasing > -Wno-deprecated-declarations -I/usr/include -I sql -I/usr/include -I > sql -g -O2 -MT apl-UserFunction_header.o -MD -MP -MF > .deps/apl-UserFunction_header.Tpo -c > -o apl-UserFunction_header.o `test -f 'UserFunction_header.cc' || > echo './'`UserFunction_header.cc > Tokenizer.cc:604:42: error: explicitly assigning value of variable of > type 'APL_Float' (aka 'double') to itself [-Werror,-Wself-assign] > if (!imag_need_float) imag_flt = imag_flt; > ^ > Tokenizer.cc:637:45: error: explicitly assigning value of variable of > type 'APL_Float' (aka 'double') to itself [-Werror,-Wself-assign] > if (!imag_need_float) degrees_flt = degrees_flt; > ~~~ ^ ~~~ > 2 errors generated. > > > On Tue, Jan 10, 2017 at 11:54 AM, Juergen Sauermann > wrote: >> Hi, >> >> I believe that I fixed most warnings, *SVN 842*. >> >> Since there were many warnings and from different sources, I might have >> overlooked >> some of them (or introduced new ones). Please keep reporting them. >> >> /// Jürgen >> > > > > -- > "I think as musicians, we have more vision than we credit ourselves > for. We should dive into it without reserve, and take the sort of > risks it takes to be divisive and impactful. Things have yet to be > done." >Aaron Fowler Clark > > "Do not seek to follow in the footsteps of the masters. Seek what they > sought." >Matsuo Basho > > "Knowledge speaks; wisdom listens." >Jimi Hendrix > > http://soundcloud.com/davidlamkins > http://reverbnation.com/lamkins > http://reverbnation.com/lcw > http://lamkins-guitar.com/ > http://lamkins.net/ > http://successful-lisp.com/ -- "I think as musicians, we have more vision than we credit ourselves for. We should dive into it without reserve, and take the sort of risks it takes to be divisive and impactful. Things have yet to be done." Aaron Fowler Clark "Do not seek to follow in the footsteps of the masters. Seek what they sought." Matsuo Basho "Knowledge speaks; wisdom listens." Jimi Hendrix http://soundcloud.com/davidlamkins http://reverbnation.com/lamkins http://reverbnation.com/lcw http://lamkins-guitar.com/ http://lamkins.net/ http://successful-lisp.com/
Re: [Bug-apl] SVN 839 doesn't compile
On my raspberry pi model 3B I got those: Xtian. make all-recursive make[1]: Entering directory '/home/xtian/gnuapl' Making all in doc make[2]: Entering directory '/home/xtian/gnuapl/doc' make[2]: Nothing to be done for 'all'. make[2]: Leaving directory '/home/xtian/gnuapl/doc' Making all in gnu-apl.d make[2]: Entering directory '/home/xtian/gnuapl/gnu-apl.d' make[2]: Nothing to be done for 'all'. make[2]: Leaving directory '/home/xtian/gnuapl/gnu-apl.d' Making all in src make[2]: Entering directory '/home/xtian/gnuapl/src' Making all in native make[3]: Entering directory '/home/xtian/gnuapl/src/native' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/home/xtian/gnuapl/src/native' Making all in APs make[3]: Entering directory '/home/xtian/gnuapl/src/APs' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/home/xtian/gnuapl/src/APs' Making all in emacs_mode make[3]: Entering directory '/home/xtian/gnuapl/src/emacs_mode' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/home/xtian/gnuapl/src/emacs_mode' Making all in sql make[3]: Entering directory '/home/xtian/gnuapl/src/sql' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/home/xtian/gnuapl/src/sql' Making all in workspaces make[3]: Entering directory '/home/xtian/gnuapl/src/workspaces' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/home/xtian/gnuapl/src/workspaces' make[3]: Entering directory '/home/xtian/gnuapl/src' g++ -DHAVE_CONFIG_H -I. -I..-Werror -Wall -Wno-strict-aliasing -Wno-deprecated-declarations -rdynamic -g -O2 -MT apl-Bif_F12_FORMAT.o -MD -MP -MF .deps/apl-Bif_F12_FORMAT.Tpo -c -o apl-Bif_F12_FORMAT.o `test -f 'Bif_F12_FORMAT.cc' || echo './'`Bif_F12_FORMAT.cc g++ -DHAVE_CONFIG_H -I. -I..-Werror -Wall -Wno-strict-aliasing -Wno-deprecated-declarations -rdynamic -g -O2 -MT apl-Bif_OPER1_REDUCE.o -MD -MP -MF .deps/apl-Bif_OPER1_REDUCE.Tpo -c -o apl-Bif_OPER1_REDUCE.o `test -f 'Bif_OPER1_REDUCE.cc' || echo './'`Bif_OPER1_REDUCE.cc g++ -DHAVE_CONFIG_H -I. -I..-Werror -Wall -Wno-strict-aliasing -Wno-deprecated-declarations -rdynamic -g -O2 -MT apl-Bif_OPER1_SCAN.o -MD -MP -MF .deps/apl-Bif_OPER1_SCAN.Tpo -c -o apl-Bif_OPER1_SCAN.o `test -f 'Bif_OPER1_SCAN.cc' || echo './'`Bif_OPER1_SCAN.cc g++ -DHAVE_CONFIG_H -I. -I..-Werror -Wall -Wno-strict-aliasing -Wno-deprecated-declarations -rdynamic -g -O2 -MT apl-CDR.o -MD -MP -MF .deps/apl-CDR.Tpo -c -o apl-CDR.o `test -f 'CDR.cc' || echo './'`CDR.cc In file included from PrintBuffer.hh:28:0, from Cell.hh:27, from Value.hh:30, from Value.icc:24, from NamedObject.hh:25, from Function.hh:27, from PrimitiveFunction.hh:25, from Bif_F12_FORMAT.hh:24, from Bif_F12_FORMAT.cc:25: Shape.hh: In member function ‘virtual Token Bif_F12_FORMAT::eval_B(Value_P)’: Shape.hh:125:18: error: array subscript is below array bounds [-Werror=array-bounds] if (rho[r]) { volume /= rho[r]; rho[r] = sh; volume *= rho[r]; } ^ Shape.hh:126:30: error: array subscript is below array bounds [-Werror=array-bounds] else { rho[r] = sh; recompute_volume(); } } ^ mv -f .deps/apl-Bif_OPER1_SCAN.Tpo .deps/apl-Bif_OPER1_SCAN.Po g++ -DHAVE_CONFIG_H -I. -I..-Werror -Wall -Wno-strict-aliasing -Wno-deprecated-declarations -rdynamic -g -O2 -MT apl-Cell.o -MD -MP -MF .deps/apl-Cell.Tpo -c -o apl-Cell.o `test -f 'Cell.cc' || echo './'`Cell.cc mv -f .deps/apl-Bif_OPER1_REDUCE.Tpo .deps/apl-Bif_OPER1_REDUCE.Po g++ -DHAVE_CONFIG_H -I. -I..-Werror -Wall -Wno-strict-aliasing -Wno-deprecated-declarations -rdynamic -g -O2 -MT apl-CharCell.o -MD -MP -MF .deps/apl-CharCell.Tpo -c -o apl-CharCell.o `test -f 'CharCell.cc' || echo './'`CharCell.cc mv -f .deps/apl-CDR.Tpo .deps/apl-CDR.Po g++ -DHAVE_CONFIG_H -I. -I..-Werror -Wall -Wno-strict-aliasing -Wno-deprecated-declarations -rdynamic -g -O2 -MT apl-Command.o -MD -MP -MF .deps/apl-Command.Tpo -c -o apl-Command.o `test -f 'Command.cc' || echo './'`Command.cc mv -f .deps/apl-Cell.Tpo .deps/apl-Cell.Po g++ -DHAVE_CONFIG_H -I. -I..-Werror -Wall -Wno-strict-aliasing -Wno-deprecated-declarations -rdynamic -g -O2 -MT apl-Common.o -MD -MP -MF .deps/apl-Common.Tpo -c -o apl-Common.o `test -f 'Common.cc' || echo './'`Common.cc mv -f .deps/apl-CharCell.Tpo .deps/apl-CharCell.Po g++ -DHAVE_CONFIG_H -I. -I..-Werror -Wall -Wno-strict-aliasing -Wno-deprecated-declarations -rdynamic -g -O2 -MT apl-ComplexCell.o -MD -MP -MF .deps/apl-ComplexCell.Tpo -c -o apl-ComplexCell.o `test -f 'ComplexCell.cc' || echo './'`ComplexCell.cc Shape.hh: In member function ‘Value_P Bif_F12_FORMAT::format_by_specification(Value_P, Value_P)’: Shape.hh:126:30: error: array subscript is below array bounds [-Werror=array-bounds]
Re: [Bug-apl] SVN 839 doesn't compile
There's one remaining when compiling 843 under clang. The attached patch fixes that as well as the remaining error reported by gcc. On Tue, Jan 10, 2017 at 03:54:36PM -0800, David Lamkins wrote: > Worth noting: There are now no warnings or notes when compiling under gcc > 6.3.1. > > On Tue, Jan 10, 2017 at 3:45 PM, David Lamkins wrote: > > Thank you, Juergen. > > > > SVN 843 compiles under gcc 6.3.1. > > > > This is the sole remaining error when compiling with clang 3.8.0: > > > > clang++ -DHAVE_CONFIG_H -I. -I..-Werror -Wall -Wno-strict-aliasing > > -Wno-deprecated-declarations -I/usr/include -I sql -I/usr/include -I > > sql -g -O2 -MT apl-UserFunction_header.o -MD -MP -MF > > .deps/apl-UserFunction_header.Tpo -c > > -o apl-UserFunction_header.o `test -f 'UserFunction_header.cc' || > > echo './'`UserFunction_header.cc > > Tokenizer.cc:604:42: error: explicitly assigning value of variable of > > type 'APL_Float' (aka 'double') to itself [-Werror,-Wself-assign] > > if (!imag_need_float) imag_flt = imag_flt; > > ^ > > Tokenizer.cc:637:45: error: explicitly assigning value of variable of > > type 'APL_Float' (aka 'double') to itself [-Werror,-Wself-assign] > > if (!imag_need_float) degrees_flt = degrees_flt; > > ~~~ ^ ~~~ > > 2 errors generated. > > > > > > On Tue, Jan 10, 2017 at 11:54 AM, Juergen Sauermann > > wrote: > >> Hi, > >> > >> I believe that I fixed most warnings, *SVN 842*. > >> > >> Since there were many warnings and from different sources, I might have > >> overlooked > >> some of them (or introduced new ones). Please keep reporting them. > >> > >> /// Jürgen > >> > > > > > > > > -- > > "I think as musicians, we have more vision than we credit ourselves > > for. We should dive into it without reserve, and take the sort of > > risks it takes to be divisive and impactful. Things have yet to be > > done." > >Aaron Fowler Clark > > > > "Do not seek to follow in the footsteps of the masters. Seek what they > > sought." > >Matsuo Basho > > > > "Knowledge speaks; wisdom listens." > >Jimi Hendrix > > > > http://soundcloud.com/davidlamkins > > http://reverbnation.com/lamkins > > http://reverbnation.com/lcw > > http://lamkins-guitar.com/ > > http://lamkins.net/ > > http://successful-lisp.com/ > > > > -- > "I think as musicians, we have more vision than we credit ourselves > for. We should dive into it without reserve, and take the sort of > risks it takes to be divisive and impactful. Things have yet to be > done." >Aaron Fowler Clark > > "Do not seek to follow in the footsteps of the masters. Seek what they > sought." >Matsuo Basho > > "Knowledge speaks; wisdom listens." >Jimi Hendrix > > http://soundcloud.com/davidlamkins > http://reverbnation.com/lamkins > http://reverbnation.com/lcw > http://lamkins-guitar.com/ > http://lamkins.net/ > http://successful-lisp.com/ Index: src/APs/AP210.cc === --- src/APs/AP210.cc(revision 843) +++ src/APs/AP210.cc(working copy) @@ -201,7 +201,7 @@ delete var_D.data; var_D.data = new CDR_string(buffer, nb); -delete buffer; +delete[] buffer; return 0; } else if (code == 'D') // char (var size) Index: src/Tokenizer.cc === --- src/Tokenizer.cc(revision 843) +++ src/Tokenizer.cc(working copy) @@ -601,7 +601,7 @@ bool imag_need_float = false; const bool imag_valid = tokenize_real(src, imag_need_float, imag_flt, imag_int); -if (!imag_need_float) imag_flt = imag_flt; +if (!imag_need_float) (void)imag_flt; if (!imag_valid) { @@ -634,7 +634,7 @@ bool imag_need_float = false; const bool imag_valid = tokenize_real(src, imag_need_float, degrees_flt, degrees_int); -if (!imag_need_float) degrees_flt = degrees_flt; +if (!imag_need_float) (void)degrees_flt; if (!imag_valid) {