History

define __OPTIMIZE__ if -ON (N != 0)

this is gcc behaviour

seyko committed 11 years ago

Commit ff06d421 parent c497f9c1 file · +9 −0Browse files

Unified · Split

libtcc.c+9−0
@@ -2048,6 +2048,15 @@ PUB_FUNC int tcc_parse_args(TCCState *s, int argc, char **argv) · 2047 unmodified lines
2048 tcc_warning("unsupported language '%s'", optarg);2048 tcc_warning("unsupported language '%s'", optarg);
2049 break;2049 break;
2050 case TCC_OPTION_O:2050 case TCC_OPTION_O:
2051 if (1) {
2052 int opt = atoi(optarg);
2053 char *sym = "__OPTIMIZE__";
2054 if (opt)
2055 tcc_define_symbol(s, sym, 0);
2056 else
2057 tcc_undefine_symbol(s, sym);
2058 }
2059 break;
2051 case TCC_OPTION_pedantic:2060 case TCC_OPTION_pedantic:
2052 case TCC_OPTION_pipe:2061 case TCC_OPTION_pipe:
2053 /* ignored */2062 /* ignored */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t