mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-23 06:32:23 +00:00
kconfig: Sync with upstream v5.8
09d5873e4d1f kconfig: allow only 'config', 'comment', and 'if' inside 'choice' 644a4b6cecc2 kconfig: do not assign a variable in the return statement cfc6eea9f6af kconfig: do not use OR-assignment for zero-cleared structure Signed-off-by: Chris Packham <judge.packham@gmail.com>
This commit is contained in:
parent
30bffa96b2
commit
5263bf8339
@ -65,7 +65,8 @@ void menu_add_entry(struct symbol *sym)
|
||||
struct menu *menu_add_menu(void)
|
||||
{
|
||||
last_entry_ptr = ¤t_entry->list;
|
||||
return current_menu = current_entry;
|
||||
current_menu = current_entry;
|
||||
return current_menu;
|
||||
}
|
||||
|
||||
void menu_end_menu(void)
|
||||
@ -157,13 +158,7 @@ struct property *menu_add_prompt(enum prop_type type, char *prompt,
|
||||
{
|
||||
struct property *prop = menu_add_prop(type, NULL, dep);
|
||||
|
||||
/* For crostool-NG, a leading pipe followed with spaces
|
||||
* means that pipe shall be removed, and the spaces should
|
||||
* not be trimmed.
|
||||
*/
|
||||
if (*prompt == '|')
|
||||
prompt++;
|
||||
else if (isspace(*prompt)) {
|
||||
if (isspace(*prompt)) {
|
||||
prop_warn(prop, "leading whitespace ignored");
|
||||
while (isspace(*prompt))
|
||||
prompt++;
|
||||
|
@ -119,20 +119,24 @@ mainmenu_stmt: T_MAINMENU T_WORD_QUOTE T_EOL
|
||||
|
||||
stmt_list:
|
||||
/* empty */
|
||||
| stmt_list common_stmt
|
||||
| stmt_list assignment_stmt
|
||||
| stmt_list choice_stmt
|
||||
| stmt_list comment_stmt
|
||||
| stmt_list config_stmt
|
||||
| stmt_list if_stmt
|
||||
| stmt_list menu_stmt
|
||||
| stmt_list menuconfig_stmt
|
||||
| stmt_list source_stmt
|
||||
| stmt_list T_WORD error T_EOL { zconf_error("unknown statement \"%s\"", $2); }
|
||||
| stmt_list error T_EOL { zconf_error("invalid statement"); }
|
||||
;
|
||||
|
||||
common_stmt:
|
||||
if_stmt
|
||||
| comment_stmt
|
||||
| config_stmt
|
||||
| menuconfig_stmt
|
||||
| source_stmt
|
||||
| assignment_stmt
|
||||
stmt_list_in_choice:
|
||||
/* empty */
|
||||
| stmt_list_in_choice comment_stmt
|
||||
| stmt_list_in_choice config_stmt
|
||||
| stmt_list_in_choice if_stmt_in_choice
|
||||
| stmt_list_in_choice error T_EOL { zconf_error("invalid statement"); }
|
||||
;
|
||||
|
||||
/* config/menuconfig entry */
|
||||
@ -254,7 +258,7 @@ choice_end: end
|
||||
}
|
||||
};
|
||||
|
||||
choice_stmt: choice_entry choice_block choice_end
|
||||
choice_stmt: choice_entry stmt_list_in_choice choice_end
|
||||
;
|
||||
|
||||
choice_option_list:
|
||||
@ -305,11 +309,6 @@ default:
|
||||
| T_DEF_BOOL { $$ = S_BOOLEAN; }
|
||||
| T_DEF_TRISTATE { $$ = S_TRISTATE; }
|
||||
|
||||
choice_block:
|
||||
/* empty */
|
||||
| choice_block common_stmt
|
||||
;
|
||||
|
||||
/* if entry */
|
||||
|
||||
if_entry: T_IF expr T_EOL
|
||||
@ -331,6 +330,9 @@ if_end: end
|
||||
if_stmt: if_entry stmt_list if_end
|
||||
;
|
||||
|
||||
if_stmt_in_choice: if_entry stmt_list_in_choice if_end
|
||||
;
|
||||
|
||||
/* menu entry */
|
||||
|
||||
menu: T_MENU T_WORD_QUOTE T_EOL
|
||||
|
@ -831,7 +831,7 @@ struct symbol *sym_lookup(const char *name, int flags)
|
||||
memset(symbol, 0, sizeof(*symbol));
|
||||
symbol->name = new_name;
|
||||
symbol->type = S_UNKNOWN;
|
||||
symbol->flags |= flags;
|
||||
symbol->flags = flags;
|
||||
|
||||
symbol->next = symbol_hash[hash];
|
||||
symbol_hash[hash] = symbol;
|
||||
|
Loading…
Reference in New Issue
Block a user