diff --git a/libtcc.c b/libtcc.c index 77a116c2..5f58f40c 100644 --- a/libtcc.c +++ b/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: diff --git a/tcc.c b/tcc.c index 263beba9..6fe0cc0d 100644 --- a/tcc.c +++ b/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"