On Tue, 5 Apr 2022 at 15:27, Keith Christian  wrote:
>
> Hi Cygwin fans,
>
> Version info:
> Windows 10:10.0.19043 N/A Build 19043
> Cygwin: CYGWIN_NT-10.0  3.3.4(0.341/5/3) 2022-01-31 19:35 x86_64 Cygwin
>
> I successfully compiled diction and style from this tar file, but with errors:
> https://ftp.gnu.org/gnu/diction/diction-1.11.tar.gz
>
> Diction and style both work, but I am looking for suggestions for how
> to clean up the compile errors in lines 48 - 60 below:
>
>      1  ./configure; make; make install
(snip)

Works just fine for me:

$ uname -a
CYGWIN_NT-10.0 AMDAHL 3.3.4(0.341/5/3) 2022-01-31 19:35 x86_64 Cygwin

(configure ouptput elided)
(edit makefile to add missing -Wall -Wpedantic -Wextra)
$ make
gcc -c -I. -DSHAREDIR=\"/usr/local/share\"
-DLOCALEDIR=\"/usr/local/share/locale\" -g -O2 -pipe -Wall -Wpedantic
-Wextra -Wno-unused -Wshadow -Wbad-function-cast -Wmissing-prototypes
-Wstrict-prototypes -Wcast-align -Wcast-qual -Wpointer-arith
-Wcast-align -Wwrite-strings -Wmissing-declarations -Wnested-externs
-Wundef -pedantic -fno-common ../diction.c
../getopt.h:59:14: warning: ‘optarg’ redeclared without dllimport
attribute: previous dllimport ignored [-Wattributes]
../diction.c:190:31: warning: array subscript has type ‘char’
[-Wchar-subscripts]
  190 |         if (s>sent && isalpha(*(s-1))) continue;
      |                               ^~~~~~
gcc -c -I. -DSHAREDIR=\"/usr/local/share\"
-DLOCALEDIR=\"/usr/local/share/locale\" -g -O2 -pipe -Wall -Wpedantic
-Wextra -Wno-unused -Wshadow -Wbad-function-cast -Wmissing-prototypes
-Wstrict-prototypes -Wcast-align -Wcast-qual -Wpointer-arith
-Wcast-align -Wwrite-strings -Wmissing-declarations -Wnested-externs
-Wundef -pedantic -fno-common ../getopt.c
../getopt.c:147:1: warning: function declaration isn’t a prototype
[-Wstrict-prototypes]
  147 | extern char *getenv ();
      | ^~~~~~
../getopt.c: In function ‘_getopt_internal_r’:
../getopt.c:444:23: warning: cast discards ‘const’ qualifier from
pointer target type [-Wcast-qual]
  444 |             exchange ((char **) argv, d);
      |                       ^
../style.c:1191:18: warning: unknown conversion type character ‘(’ in
format [-Wformat=]
 1191 |         printf(_("        nominalizations %1.f% (%d)\n"),
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../style.c:40:19: note: in definition of macro ‘_’
   40 | #define _(String) String
      |                   ^~~~~~
../style.c:1191:49: note: format string is defined here
 1191 |         printf(_("        nominalizations %1.f% (%d)\n"),
      |                                                 ^
gcc -o style -g style.o sentence.o misc.o \
        getopt.o getopt1.o -lm

Both diction.exe and style.exe are created successfully.

Csaba
-- 
You can get very substantial performance improvements
by not doing the right thing. - Scott Meyers, An Effective C++11/14 Sampler
So if you're looking for a completely portable, 100% standards-conformant way
to get the wrong information: this is what you want. - Scott Meyers (C++TDaWYK)

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to