X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=nesc.git;a=blobdiff_plain;f=src%2Fmachine%2Fsdcc.c;fp=src%2Fmachine%2Fsdcc.c;h=daa5cc72e4f8eae203007e80a4b4879446a4c350;hp=dbc732d22be992f5ddb5aa5b243015e8bf0bb253;hb=7b54393e237ed8f23c0c74f0a6cbc8de26c5bf98;hpb=57d4530c4d6814fa25338a00cc65b95938c723b6 diff --git a/src/machine/sdcc.c b/src/machine/sdcc.c index dbc732d..daa5cc7 100644 --- a/src/machine/sdcc.c +++ b/src/machine/sdcc.c @@ -42,13 +42,18 @@ static int sdcc_token(const char *token, int len, struct yystype *lvalp) struct sdccword *keyword = is_sdcc_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; } static machine_spec sdcc_machine = { - "sdcc", NULL, + "sdcc51", NULL, FALSE, /* big_endian */ FALSE, /* pcc_bitfield_type_matters */ 8, /* empty field boundary - in bits */ @@ -65,12 +70,14 @@ static machine_spec sdcc_machine = { 1, 1, 1, 1, /* int1/2/4/8 align */ 2, 2, /* wchar_t, size_t size */ TRUE, TRUE, /* char, wchar_t signed */ + NULL, /* no attribute for async functions */ NULL, /* adjust_field_align function */ NULL, NULL, NULL, NULL, /* attribute handling functions */ NULL, sdcc_init, sdcc_token, NULL, /* Keil C special */ - NULL, /* global cpp support */ + gcc_global_cpp_init, /* global cpp support: this should be tailored to sdcc + to get correct behaviour */ NULL /* per-file cpp support */ };