Merge remote-tracking branch 'origin/maint'

* origin/maint:
  misc: pacify the Tiny C Compiler
  cpp: make the check of Flex version portable
  misc: require getline
  c++: support wide strings for file names
  doc: document carets
  tests: enhance existing tests with carets
  errors: show carets
  getargs: add support for --flags/-f

Conflicts:
	doc/bison.texi
	m4/.gitignore
	src/complain.c
	src/flex-scanner.h
	src/getargs.c
	src/getargs.h
	src/gram.c
	src/main.c
	tests/headers.at
This commit is contained in:
Theophile Ranquet
2012-12-06 11:43:02 +01:00
24 changed files with 519 additions and 43 deletions

View File

@@ -110,12 +110,15 @@ error_message (const location *loc, warnings flags, const char *prefix,
warnings_print_categories (flags);
{
size_t l = strlen (message);
if (l < 2 || message[l-2] != ':' || message[l-1] != ' ')
if (l < 2 || message[l - 2] != ':' || message[l - 1] != ' ')
{
putc ('\n', stderr);
fflush (stderr);
if (loc && feature_flag & feature_caret)
location_caret (stderr, *loc);
}
}
fflush (stderr);
}
/** Raise a complaint. That can be a fatal error, a complaint or just a