History

fixed -w option - doc update (thanx to Romain Francoise)

bellard committed 23 years ago

Commit c5ce5ea1 parent 9c1106d2 files · +15 −14Browse files

Unified · Split

2 files
  1. tcc-doc.texi +9 −2
  2. tcc.c +6 −12
tcc-doc.texi+9−2
@@ -181,7 +181,14 @@ Undefine preprocessor symbol @samp{sym}. · 180 unmodified lines
181 181
182Warning options:182Warning options:
183 183
184Note: each warning option has a negative form beginning with @option{-Wno-}.184@table @option
185@item -w
186Disable all warnings.
187
188@end table
189
190Note: each of the following warning options has a negative form beginning with
191@option{-Wno-}.
185 192
186@table @option193@table @option
187@item -Wunsupported194@item -Wunsupported
@@ -604,7 +611,7 @@ executable ELF files and dynamic ELF libraries without relying on an · 416 unmodified lines
604external linker.611external linker.
605 612
606Dynamic ELF libraries can be output but the C compiler does not generate613Dynamic ELF libraries can be output but the C compiler does not generate
607position independent code (PIC). It means that the dynamic librairy614position independent code (PIC). It means that the dynamic library
608code generated by TCC cannot be factorized among processes yet.615code generated by TCC cannot be factorized among processes yet.
609 616
610TCC linker eliminates unreferenced object code in libraries. A single pass is617TCC linker eliminates unreferenced object code in libraries. A single pass is
tcc.c+6−12
@@ -408,7 +408,8 @@ struct TCCState { · 407 unmodified lines
408 int warn_write_strings;408 int warn_write_strings;
409 int warn_unsupported;409 int warn_unsupported;
410 int warn_error;410 int warn_error;
411 411 int warn_none;
412
412 /* error handling */413 /* error handling */
413 void *error_opaque;414 void *error_opaque;
414 void (*error_func)(void *opaque, const char *msg);415 void (*error_func)(void *opaque, const char *msg);
@@ -1238,6 +1239,9 @@ void warning(const char *fmt, ...) · 823 unmodified lines
1238 TCCState *s1 = tcc_state;1239 TCCState *s1 = tcc_state;
1239 va_list ap;1240 va_list ap;
1240 1241
1242 if (s1->warn_none)
1243 return;
1244
1241 va_start(ap, fmt);1245 va_start(ap, fmt);
1242 error1(s1, 1, fmt, ap);1246 error1(s1, 1, fmt, ap);
1243 va_end(ap);1247 va_end(ap);
@@ -9551,16 +9555,6 @@ int tcc_set_warning(TCCState *s, const char *warning_name, int value) · 8307 unmodified lines
9551 9555
9552#if !defined(LIBTCC)9556#if !defined(LIBTCC)
9553 9557
9554static void tcc_reset_warnings(TCCState *s)
9555{
9556 int i;
9557 const WarningDef *p;
9558
9559 for(i = 0, p = warning_defs; i < countof(warning_defs); i++, p++) {
9560 *(int *)((uint8_t *)s + p->offset) = 0;
9561 }
9562}
9563
9564/* extract the basename of a file */9558/* extract the basename of a file */
9565static const char *tcc_basename(const char *name)9559static const char *tcc_basename(const char *name)
9566{9560{
@@ -9872,7 +9866,7 @@ int main(int argc, char **argv) · 305 unmodified lines
9872 }9866 }
9873 break;9867 break;
9874 case TCC_OPTION_w:9868 case TCC_OPTION_w:
9875 tcc_reset_warnings(s);9869 s->warn_none = 1;
9876 break;9870 break;
9877 case TCC_OPTION_rdynamic:9871 case TCC_OPTION_rdynamic:
9878 s->rdynamic = 1;9872 s->rdynamic = 1;

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