struct keilword *keyword = is_keil_word(token, len);
if (keyword)
- return keyword->token;
+ {
+ lvalp->idtoken.location = last_location();
+ lvalp->idtoken.id = make_cstring(parse_region, token, len);
+ lvalp->idtoken.decl = NULL;
+ return keyword->token;
+ }
return IDENTIFIER;
}
region r = parse_region;
/* Build __attribute__((keil_address(address))) */
word aword = new_word(r, loc, str2cstring(r, "keil_address"));
- gcc_attribute address_attr = new_gcc_attribute(r, loc, aword, address);
+ target_attribute address_attr = new_target_attribute(r, loc, aword, address);
/* Build a declaration for name */
declarator d = make_identifier_declarator(loc, name);
/* Basic pointer sizes and alignments for the 8051's compiled w/ Keil C51 */
static machine_spec keil_machine = {
- "keil", NULL,
+ "keil51", NULL,
TRUE, /* big_endian */
FALSE, /* pcc_bitfield_type_matters */
8, /* empty field boundary - in bits */
1, 1, 1, 1, /* int1/2/4/8 align */
2, 2, /* wchar_t, size_t size */
TRUE, TRUE, /* char, wchar_t signed */
+ "reentrant", /* attribute for async functions */
NULL, /* adjust_field_align function */
NULL, NULL, NULL, NULL, /* attribute handling functions */
NULL, keil_init,
keil_token,
keil_special, /* Keil C special */
- NULL, /* global cpp support */
+ gcc_global_cpp_init, /* global cpp support: this should be tailored to keil
+ to get correct behaviour */
NULL /* per-file cpp support */
};