[Bug bootstrap/39470] New: [melt] - lrand48_r() and srand48_r() are GNU extensions and are not portable
rob1weld at aol dot com
gcc-bugzilla@gcc.gnu.org
Sun Mar 15 22:52:00 GMT 2009
The files ../melt-branch/gcc/compiler-probe.c and ../melt-branch/gcc/basilys.c
both use the GNU extensions lrand48_r() and srand48_r() and are not portable.
srand48_r(3) - Linux man page
http://linux.die.net/man/3/srand48_r
or
The GNU C Library
http://www.delorie.com/gnu/docs/glibc/libc_398.html
or
drand48_r(3) - phpMan
http://phpunixman.sourceforge.net/index.php/man/drand48_r/3
"CONFORMING TO
These functions are GNU extensions and are not portable."
In the mean time I will hunt down an implementation from
somewhere and drop it in so as to not affect the build.
Thanks,
Rob
# gmake
...
gcc -c -g -fkeep-inline-functions -DIN_GCC -W -Wall -Wwrite-strings
-Wstrict-prototypes -Wmissing-prototypes -Wcast-qual -Wold-style-definition
-Wc++-compat -Wmissing-format-attribute -pedantic -Wno-long-long
-Wno-variadic-macros -Wno-overlength-strings -Wno-error -DHAVE_CONFIG_H -I.
-I. -I../../melt-branch/gcc -I../../melt-branch/gcc/.
-I../../melt-branch/gcc/../include -I./../intl
-I../../melt-branch/gcc/../libcpp/include -I/usr/local/include
-I/usr/local/include -I../../melt-branch/gcc/../libdecnumber
-I../../melt-branch/gcc/../libdecnumber/dpd -I../libdecnumber
-I/usr/local/include -I/include -DCLOOG_PPL_BACKEND -I/usr/local/include
../../melt-branch/gcc/compiler-probe.c -o compiler-probe.o
../../melt-branch/gcc/compiler-probe.c: In function Âdel_proberequestÂ:
../../melt-branch/gcc/compiler-probe.c:241: warning: initialization discards
qualifiers from pointer target type
../../melt-branch/gcc/compiler-probe.c:243: warning: cast discards qualifiers
from pointer target type
../../melt-branch/gcc/compiler-probe.c: In function Âhash_filenameÂ:
../../melt-branch/gcc/compiler-probe.c:255: warning: cast discards qualifiers
from pointer target type
../../melt-branch/gcc/compiler-probe.c: In function Âeq_filenameÂ:
../../melt-branch/gcc/compiler-probe.c:262: warning: cast discards qualifiers
from pointer target type
../../melt-branch/gcc/compiler-probe.c:263: warning: cast discards qualifiers
from pointer target type
../../melt-branch/gcc/compiler-probe.c: In function Âhash_info_treeÂ:
../../melt-branch/gcc/compiler-probe.c:305: warning: cast from pointer to
integer of different size
../../melt-branch/gcc/compiler-probe.c:308: warning: cast from pointer to
integer of different size
../../melt-branch/gcc/compiler-probe.c:309: warning: cast from pointer to
integer of different size
../../melt-branch/gcc/compiler-probe.c:311: warning: cast from pointer to
integer of different size
../../melt-branch/gcc/compiler-probe.c:312: warning: cast from pointer to
integer of different size
../../melt-branch/gcc/compiler-probe.c:318: warning: cast from pointer to
integer of different size
../../melt-branch/gcc/compiler-probe.c: In function Âeq_info_treeÂ:
../../melt-branch/gcc/compiler-probe.c:329: warning: cast from pointer to
integer of different size
../../melt-branch/gcc/compiler-probe.c:330: warning: cast from pointer to
integer of different size
../../melt-branch/gcc/compiler-probe.c:339: warning: cast from pointer to
integer of different size
../../melt-branch/gcc/compiler-probe.c:343: warning: cast from pointer to
integer of different size
../../melt-branch/gcc/compiler-probe.c: At top level:
../../melt-branch/gcc/compiler-probe.c:352: warning: no previous prototype for
Âcomprobe_unique_index_of_treeÂ
../../melt-branch/gcc/compiler-probe.c: In function
Âcomprobe_unique_index_of_treeÂ:
../../melt-branch/gcc/compiler-probe.c:361: warning: cast from pointer to
integer of different size
../../melt-branch/gcc/compiler-probe.c: At top level:
../../melt-branch/gcc/compiler-probe.c:391: warning: no previous prototype for
Âcomprobe_tree_of_unique_indexÂ
../../melt-branch/gcc/compiler-probe.c: In function Âhash_info_bbÂ:
../../melt-branch/gcc/compiler-probe.c:410: warning: cast from pointer to
integer of different size
../../melt-branch/gcc/compiler-probe.c:413: warning: cast from pointer to
integer of different size
../../melt-branch/gcc/compiler-probe.c:414: warning: cast from pointer to
integer of different size
../../melt-branch/gcc/compiler-probe.c:416: warning: cast from pointer to
integer of different size
../../melt-branch/gcc/compiler-probe.c:417: warning: cast from pointer to
integer of different size
../../melt-branch/gcc/compiler-probe.c:423: warning: cast from pointer to
integer of different size
../../melt-branch/gcc/compiler-probe.c: In function Âeq_info_bbÂ:
../../melt-branch/gcc/compiler-probe.c:434: warning: cast from pointer to
integer of different size
../../melt-branch/gcc/compiler-probe.c:435: warning: cast from pointer to
integer of different size
../../melt-branch/gcc/compiler-probe.c:444: warning: cast from pointer to
integer of different size
../../melt-branch/gcc/compiler-probe.c:448: warning: cast from pointer to
integer of different size
../../melt-branch/gcc/compiler-probe.c: In function Âhash_info_gimpleÂ:
../../melt-branch/gcc/compiler-probe.c:463: warning: cast from pointer to
integer of different size
../../melt-branch/gcc/compiler-probe.c:466: warning: cast from pointer to
integer of different size
../../melt-branch/gcc/compiler-probe.c:467: warning: cast from pointer to
integer of different size
../../melt-branch/gcc/compiler-probe.c:469: warning: cast from pointer to
integer of different size
../../melt-branch/gcc/compiler-probe.c:470: warning: cast from pointer to
integer of different size
../../melt-branch/gcc/compiler-probe.c:476: warning: cast from pointer to
integer of different size
../../melt-branch/gcc/compiler-probe.c: In function Âeq_info_gimpleÂ:
../../melt-branch/gcc/compiler-probe.c:487: warning: cast from pointer to
integer of different size
../../melt-branch/gcc/compiler-probe.c:488: warning: cast from pointer to
integer of different size
../../melt-branch/gcc/compiler-probe.c:497: warning: cast from pointer to
integer of different size
../../melt-branch/gcc/compiler-probe.c:501: warning: cast from pointer to
integer of different size
../../melt-branch/gcc/compiler-probe.c: In function
Âcomprobe_unique_index_of_gimpleÂ:
../../melt-branch/gcc/compiler-probe.c:519: warning: cast from pointer to
integer of different size
../../melt-branch/gcc/compiler-probe.c: In function Âcreate_probe_processÂ:
../../melt-branch/gcc/compiler-probe.c:767: warning: cast discards qualifiers
from pointer target type
../../melt-branch/gcc/compiler-probe.c: In function Âcomprobe_stopÂ:
../../melt-branch/gcc/compiler-probe.c:946: warning: implicit declaration of
function ÂpsignalÂ
../../melt-branch/gcc/compiler-probe.c: In function Âread_probe_requestsÂ:
../../melt-branch/gcc/compiler-probe.c:1077: warning: comparison between signed
and unsigned integer expressions
../../melt-branch/gcc/compiler-probe.c: In function Âcomprobe_begin_bigÂ:
../../melt-branch/gcc/compiler-probe.c:1141: warning: implicit declaration of
function Âlrand48_rÂ
../../melt-branch/gcc/compiler-probe.c: In function Âcmp_displaychoice_ptrÂ:
../../melt-branch/gcc/compiler-probe.c:1183: warning: cast discards qualifiers
from pointer target type
../../melt-branch/gcc/compiler-probe.c:1184: warning: cast discards qualifiers
from pointer target type
../../melt-branch/gcc/compiler-probe.c: In function
Âgimple_starting_displayerÂ:
../../melt-branch/gcc/compiler-probe.c:1394: warning: format Â%ld expects type
Âlong intÂ, but argument 3 has type Âcomprobe_ix_tÂ
../../melt-branch/gcc/compiler-probe.c: In function Âtree_starting_displayerÂ:
../../melt-branch/gcc/compiler-probe.c:1426: warning: format Â%ld expects type
Âlong intÂ, but argument 3 has type Âcomprobe_ix_tÂ
../../melt-branch/gcc/compiler-probe.c: In function Âbb_starting_displayerÂ:
../../melt-branch/gcc/compiler-probe.c:1506: warning: format Â%ld expects type
Âlong intÂ, but argument 3 has type Âcomprobe_ix_tÂ
../../melt-branch/gcc/compiler-probe.c:1521: warning: format Â%ld expects type
Âlong intÂ, but argument 3 has type Âcomprobe_ix_tÂ
../../melt-branch/gcc/compiler-probe.c: In function Âbb_ending_displayerÂ:
../../melt-branch/gcc/compiler-probe.c:1545: warning: format Â%ld expects type
Âlong intÂ, but argument 3 has type Âcomprobe_ix_tÂ
../../melt-branch/gcc/compiler-probe.c:1554: warning: format Â%ld expects type
Âlong intÂ, but argument 3 has type Âcomprobe_ix_tÂ
../../melt-branch/gcc/compiler-probe.c: In function Âfill_infodialogÂ:
../../melt-branch/gcc/compiler-probe.c:1597: warning: ISO C forbids conversion
of function pointer to object pointer type
../../melt-branch/gcc/compiler-probe.c:1600: warning: ISO C forbids conversion
of function pointer to object pointer type
../../melt-branch/gcc/compiler-probe.c: In function Âcomprobe_initializeÂ:
../../melt-branch/gcc/compiler-probe.c:1798: warning: implicit declaration of
function Âsrand48_rÂ
../../melt-branch/gcc/compiler-probe.c: In function Âcomprobe_file_rankÂ:
../../melt-branch/gcc/compiler-probe.c:1887: warning: cast discards qualifiers
from pointer target type
../../melt-branch/gcc/compiler-probe.c:1915: warning: cast discards qualifiers
from pointer target type
../../melt-branch/gcc/compiler-probe.c:1917: warning: cast discards qualifiers
from pointer target type
../../melt-branch/gcc/compiler-probe.c: In function
Âcomprobe_get_gimple_positionÂ:
../../melt-branch/gcc/compiler-probe.c:2042: warning: assignment discards
qualifiers from pointer target type
../../melt-branch/gcc/compiler-probe.c: At top level:
../../melt-branch/gcc/compiler-probe.c:2107: warning: no previous prototype for
Âcomprobe_get_tree_positionÂ
../../melt-branch/gcc/compiler-probe.c: In function
Âcomprobe_get_tree_positionÂ:
../../melt-branch/gcc/compiler-probe.c:2116: warning: assignment discards
qualifiers from pointer target type
../../melt-branch/gcc/compiler-probe.c: At top level:
../../melt-branch/gcc/compiler-probe.c:2140: warning: no previous prototype for
Âcomprobe_file_rank_of_treeÂ
../../melt-branch/gcc/compiler-probe.c: In function Âadd_infopoint_bodyseqÂ:
../../melt-branch/gcc/compiler-probe.c:2194: warning: missing initializer
../../melt-branch/gcc/compiler-probe.c:2194: warning: (near initialization for
Âgsi.seqÂ)
../../melt-branch/gcc/compiler-probe.c:2196: warning: unused variable ÂgotposÂ
../../melt-branch/gcc/compiler-probe.c: In function
Âcomprobe_unique_index_of_basic_blockÂ:
../../melt-branch/gcc/compiler-probe.c:2243: warning: cast from pointer to
integer of different size
../../melt-branch/gcc/compiler-probe.c: In function
Âadd_infopoint_basic_blockÂ:
../../melt-branch/gcc/compiler-probe.c:2289: warning: missing initializer
../../melt-branch/gcc/compiler-probe.c:2289: warning: (near initialization for
Âgsi.seqÂ)
../../melt-branch/gcc/compiler-probe.c: At top level:
../../melt-branch/gcc/compiler-probe.c:1442: warning: Âtree_ending_displayerÂ
defined but not used
../../melt-branch/gcc/compiler-probe.c:214: error: storage size of ÂrandataÂ
isnÂt known
gmake[3]: *** [compiler-probe.o] Error 1
gmake[3]: Leaving directory `/usr/share/src/melt-branch_build/gcc'
gmake[2]: *** [all-stage1-gcc] Error 2
gmake[2]: Leaving directory `/usr/share/src/melt-branch_build'
gmake[1]: *** [stage1-bubble] Error 2
gmake[1]: Leaving directory `/usr/share/src/melt-branch_build'
gmake: *** [all] Error 2
( Note: MELT = http://gcc.gnu.org/wiki/MiddleEndLispTranslator + ADB +
http://gcc.gnu.org/viewcvs/branches/?sortby=date#dirlist = !flames ) :)
--
Summary: [melt] - lrand48_r() and srand48_r() are GNU extensions
and are not portable
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: blocker
Priority: P3
Component: bootstrap
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rob1weld at aol dot com
GCC build triplet: i386-pc-solaris2.11
GCC host triplet: i386-pc-solaris2.11
GCC target triplet: i386-pc-solaris2.11
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39470
More information about the Gcc-bugs
mailing list