Stack size warnings in GCC 4.7
Andy Lester
andy at petdance.com
Tue Jun 28 05:41:17 UTC 2011
GCC 4.7 has a new warning to check for stack usage over a certain amount. I added a check -Wstack-usage=500 to the compiler flags.
https://github.com/parrot/parrot/commit/d990f60e7b51edc124a93d62dbb802c4dae4b6b7
Here are the warnings it kicked out. I don't see anything obviously horrible, but it's nice to have the flag there in the future.
src/debug.c: In function ‘size_t PDB_disassemble_op(Parrot_Interp, char*, size_t, const op_info_t*, const opcode_t*, PDB_file_t*, const opcode_t*, int)’:
src/debug.c:2884:1: warning: stack usage is 1248 bytes [-Wstack-usage=]
src/spf_render.c: In function ‘STRING* Parrot_sprintf_format(Parrot_Interp, const STRING*, SPRINTF_OBJ*)’:
src/spf_render.c:943:1: warning: stack usage is 4304 bytes [-Wstack-usage=]
src/pmc/default.c: In function ‘VTABLE* Parrot_default_get_vtable(Parrot_Interp)’:
src/pmc/default.c:3448:1: warning: stack usage is 1552 bytes [-Wstack-usage=]
compilers/imcc/imcparser.c: In function ‘int yyparse(void*, imc_info_t*)’:
compilers/imcc/imcparser.c:5924:1: warning: stack usage is 2528 bytes [-Wstack-usage=]
compilers/imcc/instructions.c: In function ‘int ins_print(imc_info_t*, PIOHANDLE, const Instruction*)’:
compilers/imcc/instructions.c:650:1: warning: stack usage is 4336 bytes [-Wstack-usage=]
compilers/imcc/optimizer.c: In function ‘Instruction* IMCC_subst_constants(imc_info_t*, IMC_Unit*, const char*, SymReg**, int, int*)’:
compilers/imcc/optimizer.c:1090:1: warning: stack usage is 800 bytes [-Wstack-usage=]
src/dynpmc/file.c: In function ‘void Parrot_File_nci_copy(Parrot_Interp, PMC*)’:
src/dynpmc/file.c:332:1: warning: stack usage is 1104 bytes [-Wstack-usage=]
xoxo,
Andy
--
Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance
More information about the parrot-dev
mailing list