platform-testers
[Top][All Lists]
Advanced

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

Re: [platform-testers] Request for testing GnuCOBOL 3.1-rc1


From: Paul Zimmermann
Subject: Re: [platform-testers] Request for testing GnuCOBOL 3.1-rc1
Date: Tue, 07 Jul 2020 18:23:48 +0200

       Dear Simon,

I tested GnuCOBOL 3.1-rc1 on my x86_64 laptop (Intel core i5, gcc 5.4.0,
Ubuntu 16.04.6 LTS).

The first remark is that you say that berkeley-db is optional, but this does
not seem the case for configure:

zimmerma@mure:/tmp/gnucobol-3.1-rc1$ ./configure
...
configure: error: Berkeley DB db.h is missing

Then with ./configure --with-db=no it works fine, and I get:

zimmerma@mure:/tmp/gnucobol-3.1-rc1$ make check
...
1015 tests behaved as expected.
34 tests were skipped.

I also tried on gcc135 (https://gcc.gnu.org/wiki/CompileFarm) where I get
more interesting results:

[zimmerma@gcc135 gnucobol-3.1-rc1]$ ./configure --with-db=no 
CC=/opt/at12.0/bin/gcc 
...
[zimmerma@gcc135 gnucobol-3.1-rc1]$ make -j4
...
common.c: In function ‘print_info_detailed’:
common.c:7619:25: warning: ‘%s’ directive output truncated writing 61 bytes 
into a region of size 55 [-Wformat-truncation=]
  snprintf (buff, 55, "%s%s", GC_C_VERSION_PRF, GC_C_VERSION);
                         ^~
common.c:7619:2: note: ‘snprintf’ output 62 bytes into a destination of size 55
  snprintf (buff, 55, "%s%s", GC_C_VERSION_PRF, GC_C_VERSION);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In function ‘split_around_t’,
    inlined from ‘cob_intr_seconds_from_formatted_time’ at intrinsic.c:5416:3:
intrinsic.c:2452:4: warning: ‘strncpy’ accessing between 0 and 25 bytes at 
offsets 0 and [0, 37] may overlap up to 25 bytes at offset 24 [-Wrestrict]
    strncpy (second, str + i + 1U, second_length);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

intrinsic.c: In function ‘cob_intr_test_formatted_datetime’:
intrinsic.c:6386:3: warning: ‘strncpy’ output may be truncated copying 25 bytes 
from a string of length 36 [-Wstringop-truncation]
   strncpy (time_format_str, datetime_format_str, COB_TIMESTR_MAX);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
intrinsic.c:6384:3: warning: ‘strncpy’ output may be truncated copying 10 bytes 
from a string of length 36 [-Wstringop-truncation]
   strncpy (date_format_str, datetime_format_str, COB_DATESTR_MAX);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
intrinsic.c:6392:3: warning: ‘strncpy’ output may be truncated copying 10 bytes 
from a string of length 36 [-Wstringop-truncation]
   strncpy (formatted_date, formatted_datetime, COB_DATESTR_MAX);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

cobc.c: In function ‘process_command_line’:
cobc.c:2470:29: warning: ‘%s’ directive output truncated writing 61 bytes into 
a region of size 55 [-Wformat-truncation=]
  snprintf (versbuff, 55, "%s%s", GC_C_VERSION_PRF, GC_C_VERSION);
                             ^~
cobc.c:2470:2: note: ‘snprintf’ output 62 bytes into a destination of size 55
  snprintf (versbuff, 55, "%s%s", GC_C_VERSION_PRF, GC_C_VERSION);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1010 tests behaved as expected.
39 tests were skipped.

Now on a machine with Intel compiler:

[zimmerma@sirocco11 gnucobol-3.1-rc1]$ icc -v
icc version 19.0.4.243 (gcc version 9.2.0 compatibility)

[zimmerma@sirocco11 gnucobol-3.1-rc1]$ ./configure CC=icc
...
[zimmerma@sirocco11 gnucobol-3.1-rc1]$ make
...
icc -DHAVE_CONFIG_H -I. -I..  -I..   -O2 -pipe -finline-functions -Wall -wd1419 
-vec-report0 -opt-report 0 -MT dummymac.o -MD -MP -MF .deps/dummymac.Tpo -c -o 
dummymac.o dummymac.c
...
icc: command line remark #10148: option '-vec-report0' not supported
icc: command line error: option '-opt-report 0' is not supported. Please use 
the replacement option '-qopt-report 0'

Thus removing -vec-report0 from CFLAGS, and changing -opt-report 0 into
-qopt-report 0:

[zimmerma@sirocco11 gnucobol-3.1-rc1]$ make CFLAGS="-O2 -pipe 
-finline-functions -Wall -wd1419 -qopt-report 0"
...
icc: command line remark #10010: option '-qopt-report 0' is deprecated and will 
be removed in a future release. See '-help deprecated'
...
icc: command line error: option '-opt-report 0' is not supported. Please use 
the replacement option '-qopt-report 0'

This one seems to come from COB_CFLAGS:

[zimmerma@sirocco04 gnucobol-3.1-rc1]$ make CFLAGS="-O2 -pipe 
-finline-functions -Wall -wd1419 -qopt-report 0" 
COB_CFLAGS="-I/usr/local/include -vec-report0 -qopt-report 0 -Wno-pointer-sign 
-pipe"
...

This still fails in gnucobol-3.1-rc1/extras:

icc: command line error: option '-opt-report 0' is not supported. Please use 
the replacement option '-qopt-report 0'

I gave up here.

Paul



reply via email to

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