comparison lwasm/pragma.c @ 53:cb4efc47ce9d

Allow macros to shadow/override builtin operations when the "shadow" pragma is active, which is NOT the default
author lost@l-w.ca
date Tue, 05 Apr 2011 21:48:51 -0600
parents 7317fbe024af
children 337301ddf74a
comparison
equal deleted inserted replaced
52:51c840679a0e 53:cb4efc47ce9d
40 { "noindex0tonone", PRAGMA_NOINDEX0TONONE }, 40 { "noindex0tonone", PRAGMA_NOINDEX0TONONE },
41 { "undefextern", PRAGMA_UNDEFEXTERN }, 41 { "undefextern", PRAGMA_UNDEFEXTERN },
42 { "cescapes", PRAGMA_CESCAPES }, 42 { "cescapes", PRAGMA_CESCAPES },
43 { "importundefexport", PRAGMA_IMPORTUNDEFEXPORT }, 43 { "importundefexport", PRAGMA_IMPORTUNDEFEXPORT },
44 { "pcaspcr", PRAGMA_PCASPCR }, 44 { "pcaspcr", PRAGMA_PCASPCR },
45 { "shadow", PRAGMA_SHADOW },
45 { 0, 0 } 46 { 0, 0 }
46 }; 47 };
47 48
48 static const struct pragma_list reset_pragmas[] = 49 static const struct pragma_list reset_pragmas[] =
49 { 50 {
51 { "index0tonone", PRAGMA_NOINDEX0TONONE }, 52 { "index0tonone", PRAGMA_NOINDEX0TONONE },
52 { "noundefextern", PRAGMA_UNDEFEXTERN }, 53 { "noundefextern", PRAGMA_UNDEFEXTERN },
53 { "nocescapes", PRAGMA_CESCAPES }, 54 { "nocescapes", PRAGMA_CESCAPES },
54 { "noimportundefexport", PRAGMA_IMPORTUNDEFEXPORT }, 55 { "noimportundefexport", PRAGMA_IMPORTUNDEFEXPORT },
55 { "nopcaspcr", PRAGMA_PCASPCR }, 56 { "nopcaspcr", PRAGMA_PCASPCR },
57 { "noshadow", PRAGMA_SHADOW },
56 { 0, 0 } 58 { 0, 0 }
57 }; 59 };
58 60
59 int parse_pragma_string(asmstate_t *as, char *str, int ignoreerr) 61 int parse_pragma_string(asmstate_t *as, char *str, int ignoreerr)
60 { 62 {