Mercurial > hg > tinycc
changeset 285:96460040254e
[project @ 2003-10-04 13:04:47 by bellard]
fixed -w option - doc update (thanx to Romain Francoise)
author | bellard |
---|---|
date | Sat, 04 Oct 2003 13:04:47 +0000 |
parents | 8ab5c15040ff |
children | 141f2a86d4a8 |
files | tcc-doc.texi tcc.c |
diffstat | 2 files changed, 15 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/tcc-doc.texi Fri Sep 19 20:35:50 2003 +0000 +++ b/tcc-doc.texi Sat Oct 04 13:04:47 2003 +0000 @@ -181,7 +181,14 @@ Warning options: -Note: each warning option has a negative form beginning with @option{-Wno-}. +@table @option +@item -w +Disable all warnings. + +@end table + +Note: each of the following warning options has a negative form beginning with +@option{-Wno-}. @table @option @item -Wunsupported @@ -604,7 +611,7 @@ external linker. Dynamic ELF libraries can be output but the C compiler does not generate -position independent code (PIC). It means that the dynamic librairy +position independent code (PIC). It means that the dynamic library code generated by TCC cannot be factorized among processes yet. TCC linker eliminates unreferenced object code in libraries. A single pass is
--- a/tcc.c Fri Sep 19 20:35:50 2003 +0000 +++ b/tcc.c Sat Oct 04 13:04:47 2003 +0000 @@ -408,7 +408,8 @@ int warn_write_strings; int warn_unsupported; int warn_error; - + int warn_none; + /* error handling */ void *error_opaque; void (*error_func)(void *opaque, const char *msg); @@ -1238,6 +1239,9 @@ TCCState *s1 = tcc_state; va_list ap; + if (s1->warn_none) + return; + va_start(ap, fmt); error1(s1, 1, fmt, ap); va_end(ap); @@ -9551,16 +9555,6 @@ #if !defined(LIBTCC) -static void tcc_reset_warnings(TCCState *s) -{ - int i; - const WarningDef *p; - - for(i = 0, p = warning_defs; i < countof(warning_defs); i++, p++) { - *(int *)((uint8_t *)s + p->offset) = 0; - } -} - /* extract the basename of a file */ static const char *tcc_basename(const char *name) { @@ -9872,7 +9866,7 @@ } break; case TCC_OPTION_w: - tcc_reset_warnings(s); + s->warn_none = 1; break; case TCC_OPTION_rdynamic: s->rdynamic = 1;