fixed -w option - doc update (thanx to Romain Francoise)
This commit is contained in:
parent
9c1106d854
commit
c5ce5eaeda
2 changed files with 15 additions and 14 deletions
11
tcc-doc.texi
11
tcc-doc.texi
|
@ -181,7 +181,14 @@ Undefine preprocessor symbol @samp{sym}.
|
|||
|
||||
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 @@ executable ELF files and dynamic ELF libraries without relying on an
|
|||
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
|
||||
|
|
18
tcc.c
18
tcc.c
|
@ -408,7 +408,8 @@ struct TCCState {
|
|||
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 @@ void warning(const char *fmt, ...)
|
|||
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 @@ int tcc_set_warning(TCCState *s, const char *warning_name, int value)
|
|||
|
||||
#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 @@ int main(int argc, char **argv)
|
|||
}
|
||||
break;
|
||||
case TCC_OPTION_w:
|
||||
tcc_reset_warnings(s);
|
||||
s->warn_none = 1;
|
||||
break;
|
||||
case TCC_OPTION_rdynamic:
|
||||
s->rdynamic = 1;
|
||||
|
|
Loading…
Reference in a new issue