Repository navigation
Closed
Description
Got these on my "old" mingw environment and in the cygwin64 environment with make -f mingwin32.mak DLL=Y:
gcc -c -O4 -Wall -pedantic -I.. -DPDC_DLL_BUILD ../win32a/pdcclip.c
../win32a/pdcclip.c: In function 'PDC_setclipboard_raw':
../win32a/pdcclip.c:123:1: warning: C++ style comments are not allowed in ISO C90 [enabled by default]
// printf( "%ld bytes: %x %x %x %x\n", length,
^
../win32a/pdcclip.c:123:1: warning: (this will be reported only once per input file) [enabled by default]
gcc -c -O4 -Wall -pedantic -I.. -DPDC_DLL_BUILD ../win32a/pdcdisp.c
../win32a/pdcdisp.c:10:1: warning: C++ style comments are not allowed in ISO C90 [enabled by default]
// #ifdef CHTYPE_LONG
^
../win32a/pdcdisp.c:10:1: warning: (this will be reported only once per input file) [enabled by default]
gcc -c -O4 -Wall -pedantic -I.. -DPDC_DLL_BUILD ../win32a/pdcgetsc.c
gcc -c -O4 -Wall -pedantic -I.. -DPDC_DLL_BUILD ../win32a/pdckbd.c
../win32a/pdckbd.c: In function 'PDC_add_clipboard_to_key_queue':
../win32a/pdckbd.c:65:1: warning: C++ style comments are not allowed in ISO C90 [enabled by default]
// _tcscpy( clipboard_contents, (TCHAR *)handle);
^
../win32a/pdckbd.c:65:1: warning: (this will be reported only once per input file) [enabled by default]
gcc -c -O4 -Wall -pedantic -I.. -DPDC_DLL_BUILD ../win32a/pdcscrn.c
../win32a/pdcscrn.c: In function 'HandleSize':
../win32a/pdcscrn.c:1571:1: warning: C++ style comments are not allowed in ISO C90 [enabled by default]
// if( wine_version)
^
../win32a/pdcscrn.c:1571:1: warning: (this will be reported only once per input file) [enabled by default]
gcc -c -O4 -Wall -pedantic -I.. -DPDC_DLL_BUILD ../win32a/pdcsetsc.c
../win32a/pdcsetsc.c: In function 'PDC_set_blink':
../win32a/pdcsetsc.c:87:1: warning: C++ style comments are not allowed in ISO C90 [enabled by default]
// if (pdc_color_started) /* We've got 256 colors in this version */
^
../win32a/pdcsetsc.c:87:1: warning: (this will be reported only once per input file) [enabled by default]
gcc -c -O4 -Wall -pedantic -I.. -DPDC_DLL_BUILD ../win32a/pdcutil.c
echo LIBRARY pdcurses > pdcurses.def
echo EXPORTS >> pdcurses.def
cat ../exp-base.def >> pdcurses.def
gcc pdcurses.def -Wl,--out-implib,pdcurses.a -shared -o pdcurses.dll addch.o addchstr.o addstr.o attr.o beep.o bkgd.o border.o clear.o color.o delch.o deleteln.o deprec.o getch.o getstr.o getyx.o inch.o inchstr.o initscr.o inopts.o insch.o insstr.o instr.o kernel.o keyname.o mouse.o move.o outopts.o overlay.o pad.o panel.o printw.o refresh.o scanw.o scr_dump.o scroll.o slk.o termattr.o terminfo.o touch.o util.o window.o debug.o pdcclip.o pdcdisp.o pdcgetsc.o pdckbd.o pdcscrn.o pdcsetsc.o pdcutil.o pdcurses.def -lgdi32 -lcomdlg32
cp pdcurses.a panel.a
gcc -O4 -Wall -pedantic -I.. -DPDC_DLL_BUILD -mwindows -otestcurs.exe ../demos/testcurs.c pdcurses.dll
../demos/testcurs.c: In function 'inputTest':
../demos/testcurs.c:455:1: warning: C++ style comments are not allowed in ISO C90 [enabled by default]
// PDC_return_key_modifiers(TRUE);
^
looks like an easy fix: surround them by #ifdef 0 /* comment why this isn't active */ instead of commenting the lines by //.
Metadata
Metadata
Assignees
Labels
No labels
Activity
[-]GCC warnings in win32a[/-][+]GCC + win32a: warning: C++ style comments are not allowed in ISO C90[/+]Bill-Gray commentedon May 8, 2017
Yup, you're right, and it was an easy fix (just pushed the changes). I removed most of those comments and converted the rest to C-style comments or #iffed them out. I'm surprised none of the other assorted compilers I've used warned about that!
GitMensch commentedon May 8, 2017
The warnings are fixed with current master.
GitMensch commentedon Dec 2, 2018
Back in tui.c:
Fix to warnings (ISO C90 violations) in tui.c. See issue #37.
Bill-Gray commentedon Dec 27, 2018
Fixed. (Also led me to search for and remove a couple of other C++-style '//' comments.) I can only replicate this problem by adding the
--std=c90flag. That also leads to a problem in the VT flavor where it appears the signal handling functions are simply absent; it appears to me that the VT flavor cannot be compiled on a C90 compiler.