Hi,
I've just got GCC7 (build from svn worked like a charm, even if it took hours
but I was warned) and like the new warnings and hints very much.
When compiling GnuCOBOL from vcs (sources on mount, therefore the long path) I
got one warning with multiple and very long tilde lines.
/media/sf_Entwicklung/GnuCOBOL/gnu-cobol-2.0_texi/cobc/typeck.c: In function
'cb_build_registers':
/media/sf_Entwicklung/GnuCOBOL/gnu-cobol-2.0_texi/cobc/typeck.c:1064:30:
warning: 'snprintf' output may be truncated before the last format character
[-Wformat-truncation=]
snprintf (buff, (size_t)17, "%02d/%02d/%02d%02d%c%02d%c%02d",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/media/sf_Entwicklung/GnuCOBOL/gnu-cobol-2.0_texi/cobc/typeck.c:1064:2: note:
'snprintf' output between 17 and 63 bytes into a destination of size 17
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
current_compile_time.second);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It looks like the source in the lines between are missing (the number of tildes
is correct).
The source reads:
snprintf (buff, (size_t)17, "%02d/%02d/%02d%02d%c%02d%c%02d",
current_compile_time.day_of_month,
current_compile_time.month,
current_compile_time.year % 100,
current_compile_time.hour, '.',
current_compile_time.minute, '.',
current_compile_time.second);
Thank you for this compiler!
Simon
BTW: is it really useful to have the complete function in the output message?
The output may get *very* long...
I'm not subscribed to the list, please answer directly (CCing the list of
course), otherwise I can't read your response.
Thank you.