comparison lwasm/main.c @ 559:ddc7b05a5675

Add --no-warn=ifp1 flag to suppress warnings about ifp1 and ipf2
author William Astle <lost@l-w.ca>
date Thu, 21 Sep 2023 13:13:23 -0600
parents e10618b48e68
children
comparison
equal deleted inserted replaced
558:7fb2047ccdee 559:ddc7b05a5675
66 { "define", 'D', "SYM[=VAL]",0, "Automatically define SYM to be VAL (or 1)"}, 66 { "define", 'D', "SYM[=VAL]",0, "Automatically define SYM to be VAL (or 1)"},
67 { "preprocess", 'P', 0, 0, "Preprocess macros and conditionals and output revised source to stdout" }, 67 { "preprocess", 'P', 0, 0, "Preprocess macros and conditionals and output revised source to stdout" },
68 { "unicorns", 0x142, 0, 0, "Add sooper sekrit sauce"}, 68 { "unicorns", 0x142, 0, 0, "Add sooper sekrit sauce"},
69 { "6800compat", 0x200, 0, 0, "Enable 6800 compatibility instructions, equivalent to --pragma=6800compat" }, 69 { "6800compat", 0x200, 0, 0, "Enable 6800 compatibility instructions, equivalent to --pragma=6800compat" },
70 { "no-output", 0x105, 0, 0, "Inhibit creation of output file" }, 70 { "no-output", 0x105, 0, 0, "Inhibit creation of output file" },
71 { "no-warn", 0x109, "FLAG", 0, "Suppress warnings of the specified type" },
71 { 0 } 72 { 0 }
72 }; 73 };
73 74
74 75
75 static int parse_opts(int key, char *arg, void *state) 76 static int parse_opts(int key, char *arg, void *state)
259 260
260 case 'P': 261 case 'P':
261 as -> preprocess = 1; 262 as -> preprocess = 1;
262 break; 263 break;
263 264
265 case 0x109:
266 if (!strcasecmp(arg, "ifp1") || !strcasecmp(arg, "ifp2"))
267 as -> nowarn_flags |= NOWARN_IFP1;
268 break;
269
264 case 0x200: 270 case 0x200:
265 as -> pragmas |= PRAGMA_6800COMPAT; 271 as -> pragmas |= PRAGMA_6800COMPAT;
266 break; 272 break;
267 273
268 case lw_cmdline_key_end: 274 case lw_cmdline_key_end: