option to use an old algorithm of the array in struct initialization

This is for a case when no '{' is used in the initialization code.
    An option name is -fold-struct-init-code. A linux 2.4.26 can't
    find initrd when compiled with a new algorithm.
This commit is contained in:
seyko
2015-04-10 23:44:10 +03:00
parent 92efee6e52
commit 5c9dde7255
3 changed files with 34 additions and 4 deletions

2
tcc.h
View File

@ -603,6 +603,8 @@ struct TCCState {
int char_is_unsigned;
int leading_underscore;
int ms_extensions; /* allow nested named struct w/o identifier behave like unnamed */
int old_struct_init_code; /* use old algorithm to init array in struct when there is no '{' used.
Liuux 2.4.26 can't find initrd when compiled with a new algorithm */
/* warning switches */
int warn_write_strings;