recognize -std=gnu11 and treat it the same as -std=c11
This commit is contained in:
parent
3110f69e4e
commit
b668b72b06
2 changed files with 3 additions and 3 deletions
2
libtcc.c
2
libtcc.c
|
@ -1977,7 +1977,7 @@ dorun:
|
|||
s->static_link = 1;
|
||||
break;
|
||||
case TCC_OPTION_std:
|
||||
if (strcmp(optarg, "=c11") == 0)
|
||||
if (strcmp(optarg, "=c11") == 0 || strcmp(optarg, "=gnu11") == 0)
|
||||
s->cversion = 201112;
|
||||
break;
|
||||
case TCC_OPTION_shared:
|
||||
|
|
4
tcc.c
4
tcc.c
|
@ -33,8 +33,8 @@ static const char help[] =
|
|||
" -o outfile set output filename\n"
|
||||
" -run run compiled source\n"
|
||||
" -fflag set or reset (with 'no-' prefix) 'flag' (see tcc -hh)\n"
|
||||
" -std=c99 Conform to the ISO 1999 C standard (default).\n"
|
||||
" -std=c11 Conform to the ISO 2011 C standard.\n"
|
||||
" -std=(c99|gnu99) Conform to the ISO 1999 C standard (default).\n"
|
||||
" -std=(c11|gnu11) Conform to the ISO 2011 C standard.\n"
|
||||
" -Wwarning set or reset (with 'no-' prefix) 'warning' (see tcc -hh)\n"
|
||||
" -w disable all warnings\n"
|
||||
" -v --version show version\n"
|
||||
|
|
Loading…
Reference in a new issue