bug-automake
[Top][All Lists]
Advanced

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

bug#20031: GNU Automake 1.15 fails on three "yacc" cxx related tests on


From: Mathieu Lirzin
Subject: bug#20031: GNU Automake 1.15 fails on three "yacc" cxx related tests on Solaris 10 AMD64
Date: Fri, 19 Jan 2018 13:25:42 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Hello,

Those test failures are/were happening because IIUC Solaris <cstdlib>
header declares malloc, free, exit only in the std namespace [1].

"address@hidden" <address@hidden> writes:

> /opt/solarisstudio12.4/bin/CC -DPACKAGE_NAME=\"yacc-cxx\" 
> -DPACKAGE_TARNAME=\"yacc-cxx\" -DPACKAGE_VERSION=\"1.0\" 
> -DPACKAGE_STRING=\"yacc-cxx\ 1.0\" -DPACKAGE_BUGREPORT=\"\" 
> -DPACKAGE_URL=\"\" -DPACKAGE=\"yacc-cxx\" -DVERSION=\"1.0\" -I.    
> -I/usr/local/include -D_TS_ERRNO -D_POSIX_PTHREAD_SEMANTICS 
> -D_LARGEFILE64_SOURCE  -dalign -erroff=%none -errtags=yes -ftrap=%none -g 
> -xcode=pic32 -m64 -mc -xunroll=1 -xbuiltin=%none -xtarget=opteron -xdepend=no 
> -xnolibmopt -xlinkopt=0 -xnolibmil -xregs=no%frameptr -xs 
> -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -D_TS_ERRNO -c -o parse1.o 
> parse1.cc
> "parse1.cc", line 1053: Error: The function "malloc" must have a prototype.
> "parse1.cc", line 1060: Error: The function "free" must have a prototype.
> "parse1.yy", line 10: Error: The function "exit" must have a prototype.
> "parse1.cc", line 1406: Error: The function "free" must have a prototype.
> 4 Error(s) detected.
> *** Error code 2
> make: Fatal error: Command failed for target `parse1.o'

The explicit inclusion of <cstdlib> instead of <stdlib.h> is made
because those tests want to ensure that the code is invalid C.

What would seem a more robust solution would be to include <stdlib.h>
instead and make the code invalid C by another mean.

Sorry for long delay.  Thanks for the report.

[1] https://docs.oracle.com/cd/E19205-01/819-5267/bkajw/index.html

-- 
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761  070D 0ADE E100 9460 4D37





reply via email to

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