Bug #7381 libmysql.c compile failure
Description:
Non-gcc compilers complain loudly about the current libmysql.c:
Solaris:
04776: cc -DDEFAULT_CHARSET_HOME=\"/usr/local/mysql\" -DDATADIR=\"/usr/local/mysql/data\" -DSHAREDIR=\"/usr/local/mysql/share/mysql\" -DDONT_USE_RAID -DMYSQL_CLIENT -I. -I. -I.. -I../include -I../extra -g -DDBUG_ON -DSAFE_MUTEX -xO3 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil -xlibmopt -xtarget=native -D_FILE_OFFSET_BITS=64 -DBIG_TABLES -DHAVE_RWLOCK_T -c libmysql.c -o libmysql.o
04777: "libmysql.c", line 3817: void function cannot return value
04778: "libmysql.c", line 3826: void function cannot return value
04779: cc: acomp failed for libmysql.c
HP-UX:
05368: cc "-DDEFAULT_CHARSET_HOME=\"/usr/local/mysql\"" "-DDATADIR=\"/usr/local/mysql/data\"" "-DSHAREDIR=\"/usr/local/mysql/share/mysql\"" -DDONT_USE_RAID -DMYSQL_CLIENT -I. -I. -I.. -I../include -I../extra -g -DDBUG_ON -DSAFE_MUTEX -O3 -c99 -OPT:Olimit=0 -c libmysql.c -Wp,-MDupdate,.deps/libmysql.TPlo -o libmysql.o
05369: cc-1117 cc: ERROR File = libmysql.c, Line = 3816
05370: An expression appears after a "return" in a "void" function.
05371:
05372: return fetch_float_with_conversion(param, field,
05373: ^
05374:
05375: cc-1117 cc: ERROR File = libmysql.c, Line = 3826
05376: An expression appears after a "return" in a "void" function.
05377:
05378: return fetch_long_with_conversion(param, field, value);
05379: ^
05380:
05381: cc-1185 cc: WARNING File = libmysql.c, Line = 4143
05382: An enumerated type is mixed with another type.
05383:
05384: range1[]= { MYSQL_TYPE_SHORT, MYSQL_TYPE_YEAR, 0 },
05385: ^
05386:
05387: cc-1185 cc: WARNING File = libmysql.c, Line = 4144
05388: An enumerated type is mixed with another type.
05389:
05390: range2[]= { MYSQL_TYPE_INT24, MYSQL_TYPE_LONG, 0 },
05391: ^
05392:
05393: cc-1185 cc: WARNING File = libmysql.c, Line = 4145
05394: An enumerated type is mixed with another type.
05395:
05396: range3[]= { MYSQL_TYPE_DATETIME, MYSQL_TYPE_TIMESTAMP, 0 },
05397: ^
05398:
05399: cc-1185 cc: WARNING File = libmysql.c, Line = 4149
05400: An enumerated type is mixed with another type.
05401:
05402: MYSQL_TYPE_DECIMAL, 0 },
05403: ^
05404:
05405: 2 errors detected in the compilation of "libmysql.c".
IRIX:
09373: cc: "libmysql.c", line 3816: error 1610: Attempting to return value from function of type void.
09374: cc: "libmysql.c", line 3826: error 1610: Attempting to return value from function of type void.
How to repeat:
Compile libmysql.c with a non-gcc compiler like Sun Studio, or HP aCC and observe the error.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.039 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.
Description: Non-gcc compilers complain loudly about the current libmysql.c: Solaris: 04776: cc -DDEFAULT_CHARSET_HOME=\"/usr/local/mysql\" -DDATADIR=\"/usr/local/mysql/data\" -DSHAREDIR=\"/usr/local/mysql/share/mysql\" -DDONT_USE_RAID -DMYSQL_CLIENT -I. -I. -I.. -I../include -I../extra -g -DDBUG_ON -DSAFE_MUTEX -xO3 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil -xlibmopt -xtarget=native -D_FILE_OFFSET_BITS=64 -DBIG_TABLES -DHAVE_RWLOCK_T -c libmysql.c -o libmysql.o 04777: "libmysql.c", line 3817: void function cannot return value 04778: "libmysql.c", line 3826: void function cannot return value 04779: cc: acomp failed for libmysql.c HP-UX: 05368: cc "-DDEFAULT_CHARSET_HOME=\"/usr/local/mysql\"" "-DDATADIR=\"/usr/local/mysql/data\"" "-DSHAREDIR=\"/usr/local/mysql/share/mysql\"" -DDONT_USE_RAID -DMYSQL_CLIENT -I. -I. -I.. -I../include -I../extra -g -DDBUG_ON -DSAFE_MUTEX -O3 -c99 -OPT:Olimit=0 -c libmysql.c -Wp,-MDupdate,.deps/libmysql.TPlo -o libmysql.o 05369: cc-1117 cc: ERROR File = libmysql.c, Line = 3816 05370: An expression appears after a "return" in a "void" function. 05371: 05372: return fetch_float_with_conversion(param, field, 05373: ^ 05374: 05375: cc-1117 cc: ERROR File = libmysql.c, Line = 3826 05376: An expression appears after a "return" in a "void" function. 05377: 05378: return fetch_long_with_conversion(param, field, value); 05379: ^ 05380: 05381: cc-1185 cc: WARNING File = libmysql.c, Line = 4143 05382: An enumerated type is mixed with another type. 05383: 05384: range1[]= { MYSQL_TYPE_SHORT, MYSQL_TYPE_YEAR, 0 }, 05385: ^ 05386: 05387: cc-1185 cc: WARNING File = libmysql.c, Line = 4144 05388: An enumerated type is mixed with another type. 05389: 05390: range2[]= { MYSQL_TYPE_INT24, MYSQL_TYPE_LONG, 0 }, 05391: ^ 05392: 05393: cc-1185 cc: WARNING File = libmysql.c, Line = 4145 05394: An enumerated type is mixed with another type. 05395: 05396: range3[]= { MYSQL_TYPE_DATETIME, MYSQL_TYPE_TIMESTAMP, 0 }, 05397: ^ 05398: 05399: cc-1185 cc: WARNING File = libmysql.c, Line = 4149 05400: An enumerated type is mixed with another type. 05401: 05402: MYSQL_TYPE_DECIMAL, 0 }, 05403: ^ 05404: 05405: 2 errors detected in the compilation of "libmysql.c". IRIX: 09373: cc: "libmysql.c", line 3816: error 1610: Attempting to return value from function of type void. 09374: cc: "libmysql.c", line 3826: error 1610: Attempting to return value from function of type void. How to repeat: Compile libmysql.c with a non-gcc compiler like Sun Studio, or HP aCC and observe the error.