David Malcolm 14e18d7100 C: fix logic within c_expr::get_location
In r251239 I added a c_expr::get_location method for use by
c_parser_expr_list for building the vec<location_t> for
an expression list, rather than using the location of the first token.

When determining whether to use the location within the tree node,
or fall back to the range in the c_expr, I used EXPR_CAN_HAVE_LOCATION,
rather than EXPR_HAS_LOCATION.  This meant that any tree nodes of kinds
that *can* have a location but which erroneously had
   EXPR_LOCATION (value) == UNKNOWN_LOCATION
had that value added to the vec<location_t>, leading to missing
location information when reporting on the issue
(seen with gcc.dg/Wtraditional-conversion-2.c for m68k).

This patch addresses this in two ways:

(a) it fixes the specific issue in this failing test case, by
    setting up the location properly on the EXCESS_PRECISION_EXPR.

(b) updating c_expr::get_location by only using the EXPR_LOCATION
    if it's sane.  Arguably this is papering over bugs, but they are
    pre-existing ones exposed by r251239, and I'd rather have this
    fix in place than play whack-a-mole on any other such "missing
    location" bugs that are lurking in the codebase.

gcc/c/ChangeLog:
	* c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
	than CAN_HAVE_LOCATION_P when determining whether to use the
	location_t value within "value".

gcc/c-family/ChangeLog:
	* c-lex.c (interpret_float): Use token location
	when building an EXCESS_PRECISION_EXPR.

From-SVN: r251335
2017-08-24 14:28:16 +00:00
2017-05-12 09:20:37 +00:00
2017-08-02 08:45:55 -04:00
2017-07-21 00:27:51 +00:00
2017-08-04 23:21:23 +01:00
2017-07-31 12:02:33 +00:00
2017-07-31 11:37:27 -07:00

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.
Description
No description provided
Readme 2.1 GiB
Languages
C++ 31.9%
C 31.3%
Ada 12%
D 6.5%
Go 6.4%
Other 11.5%