This does not change our generated code.
Unified · Split
| @@ -1827,7 +1827,13 @@ reparse: · 1826 unmodified lines | ||
| 1827 | 1827 | break; |
| 1828 | 1828 | #endif |
| 1829 | 1829 | case TCC_OPTION_g: |
| 1830 | − s->do_debug = 1; | |
| 1830 | + /* Use "-g" as alias for "-g1". Use "-g0" to disable debug */ | |
| 1831 | + /* Other common used values: "-g0", "-g1", "-g2" and "-g3" */ | |
| 1832 | + /* no failure with unsupported options */ | |
| 1833 | + if (isnum(*optarg)) | |
| 1834 | + s->do_debug = atoi(optarg); | |
| 1835 | + else | |
| 1836 | + s->do_debug = 1; | |
| 1831 | 1837 | break; |
| 1832 | 1838 | case TCC_OPTION_c: |
| 1833 | 1839 | x = TCC_OUTPUT_OBJ; |