Cygwin build issue: template function in nl-import

Started by rickyboy, November 29, 2012, 12:27:29 PM

Previous topic - Next topic

rickyboy

I'm building 10.4.5 from sources on Cygwin and get this message on the compile of nl-import.


gcc -m32 -Wall -pedantic -Wno-strict-aliasing -Wno-long-long -c -O2 -g -DREADLINE -DCYGWIN nl-import.c
nl-import.c: In function ‘p_importLib’:
nl-import.c:196:1: warning: ISO C forbids nested functions
nl-import.c:196:1: warning: ISO C90 forbids mixed declarations and code
nl-import.c:247:1: warning: ISO C forbids nested functions
nl-import.c:321:1: warning: ISO C forbids nested functions
nl-import.c:393:1: warning: ISO C forbids nested functions
nl-import.c:412:1: warning: ISO C forbids nested functions
nl-import.c:414:1: warning: ISO C forbids nested functions
nl-import.c:416:1: warning: ISO C forbids nested functions
nl-import.c:418:1: warning: ISO C forbids nested functions
nl-import.c:420:1: warning: ISO C forbids nested functions
nl-import.c:422:1: warning: ISO C forbids nested functions
nl-import.c:424:1: warning: ISO C forbids nested functions
nl-import.c:426:1: warning: ISO C forbids nested functions
nl-import.c:428:1: warning: ISO C forbids nested functions
nl-import.c:430:1: warning: ISO C forbids nested functions
nl-import.c:432:1: warning: ISO C forbids nested functions
nl-import.c:434:1: warning: ISO C forbids nested functions
nl-import.c:436:1: warning: ISO C forbids nested functions
nl-import.c:438:1: warning: ISO C forbids nested functions
nl-import.c:440:1: warning: ISO C forbids nested functions
nl-import.c:442:1: warning: ISO C forbids nested functions
nl-import.c:451:5: warning: initializer element is not computable at load time
nl-import.c:451:5: warning: initializer element is not computable at load time
nl-import.c:452:5: warning: initializer element is not computable at load time
nl-import.c:452:5: warning: initializer element is not computable at load time
nl-import.c:453:5: warning: initializer element is not computable at load time
nl-import.c:453:5: warning: initializer element is not computable at load time
nl-import.c:454:5: warning: initializer element is not computable at load time
nl-import.c:454:5: warning: initializer element is not computable at load time
nl-import.c:455:5: warning: initializer element is not computable at load time
nl-import.c:455:5: warning: initializer element is not computable at load time
nl-import.c:456:5: warning: initializer element is not computable at load time
nl-import.c:456:5: warning: initializer element is not computable at load time
nl-import.c:457:5: warning: initializer element is not computable at load time
nl-import.c:457:5: warning: initializer element is not computable at load time
nl-import.c:458:5: warning: initializer element is not computable at load time
nl-import.c:458:5: warning: initializer element is not computable at load time
nl-import.c:459:5: warning: initializer element is not computable at load time
nl-import.c:459:5: warning: initializer element is not computable at load time
nl-import.c:460:5: warning: initializer element is not computable at load time
nl-import.c:460:5: warning: initializer element is not computable at load time
nl-import.c:461:5: warning: initializer element is not computable at load time
nl-import.c:461:5: warning: initializer element is not computable at load time
nl-import.c:462:5: warning: initializer element is not computable at load time
nl-import.c:462:5: warning: initializer element is not computable at load time
nl-import.c:463:5: warning: initializer element is not computable at load time
nl-import.c:463:5: warning: initializer element is not computable at load time
nl-import.c:464:5: warning: initializer element is not computable at load time
nl-import.c:464:5: warning: initializer element is not computable at load time
nl-import.c:465:5: warning: initializer element is not computable at load time
nl-import.c:465:5: warning: initializer element is not computable at load time
nl-import.c:466:5: warning: initializer element is not computable at load time
nl-import.c:466:5: warning: initializer element is not computable at load time
nl-import.c:470:1: warning: ISO C forbids nested functions
nl-import.c:470:6: error: static declaration of ‘template’ follows non-static declaration
nl-import.c:410:6: note: previous declaration of ‘template’ was here
nl-import.c:507:1: warning: ISO C forbids nested functions
nl-import.c:620:1: error: expected declaration or statement at end of input
nl-import.c:620:1: warning: control reaches end of non-void function
makefile_build:22: recipe for target `nl-import.o' failed
make[1]: *** [nl-import.o] Error 1
make[1]: Leaving directory `/cygdrive/c/Users/rick.hanson/builds/newlisp-10.4.5'
Makefile:31: recipe for target `default' failed
make: *** [default] Error 2

There's nothing wrong with code that I can see.  template shows up in a prototype first and then its definition follows, after the callback function definitions.  The warnings might indicate that there is a problem with coding matching braces, in the code before template, that could trip the error, but the braces all match.



It compiles fine on my Linux box, and both are running gcc.



Weird.
(λx. x x) (λx. x x)

Lutz

#1
Yes, very strange. CYGWIN support was dropped with version 8.6 in 2005, since using MinGW for the Windows version. Currently, I compile without warnings on Mac OSX, Windows XP, Windows 7, Ubuntu LINUX, FreeBSD and OpenBSD. The last, OpenBSD, being the most picky one.

rickyboy

#2
OK, thanks Lutz.  I understand.  I've had issues with Cygwin before, building other software, and many of those issues have been unresolved for months or years, mostly because I don't have the time to track it all down and I'm not going to mess with all the weirdness that the RedHat (Cygwin) team is not going to fix.  If they are not going to bother improving or fixing  it, I am not motivated to work on it.



"I'm too old for this s**t", as the guy from Lethal Weapon would say. My time is better spent picking a guitar or drinking some beer (or coffee with you ;).



For Windows, I will use mingw, and gladly abandon Cygwin.  Good riddance!
(λx. x x) (λx. x x)