Commit 1e3d475e by Martin Sebor Committed by Martin Sebor

utils.c (handle_nonnull_attribute): Quote attribute name.


gcc/ada/ChangeLog:

	* gcc-interface/utils.c (handle_nonnull_attribute): Quote attribute
	name.

gcc/c/ChangeLog:

	* c-typeck.c (build_binary_op): Hyphenate floating-point.

gcc/testsuite/ChangeLog:

	* gcc.dg/Wfloat-equal-1.c: Adjust text of expected diagnostic.
	* gcc.dg/misc-column.c: Ditto.

gcc/ChangeLog:

	* tree-pretty-print.h: Remove unnecessary punctuation characters
	from a diagnostic.
	* tree-ssa.c (release_defs_bitset): Correct preprocessor conditional.

From-SVN: r272619
parent c3337b44
2019-06-24 Martin Sebor <msebor@redhat.com>
* tree-pretty-print.h: Remove unnecessary punctuation characters
from a diagnostic.
* tree-ssa.c (release_defs_bitset): Correct preprocessor conditional.
2019-06-24 Jonathan Wakely <jwakely@redhat.com> 2019-06-24 Jonathan Wakely <jwakely@redhat.com>
* ginclude/float.h (FLT_DECIMAL_DIG, DBL_DECIMAL_DIG, LDBL_DECIMAL_DIG) * ginclude/float.h (FLT_DECIMAL_DIG, DBL_DECIMAL_DIG, LDBL_DECIMAL_DIG)
......
2019-06-24 Martin Sebor <msebor@redhat.com>
* gcc-interface/utils.c (handle_nonnull_attribute): Quote attribute
name.
2019-06-18 Arnaud Charlet <charlet@adacore.com> 2019-06-18 Arnaud Charlet <charlet@adacore.com>
PR ada/80590 PR ada/80590
......
...@@ -6234,7 +6234,8 @@ handle_nonnull_attribute (tree *node, tree ARG_UNUSED (name), ...@@ -6234,7 +6234,8 @@ handle_nonnull_attribute (tree *node, tree ARG_UNUSED (name),
&& (!TYPE_ATTRIBUTES (type) && (!TYPE_ATTRIBUTES (type)
|| !lookup_attribute ("type generic", TYPE_ATTRIBUTES (type)))) || !lookup_attribute ("type generic", TYPE_ATTRIBUTES (type))))
{ {
error ("nonnull attribute without arguments on a non-prototype"); error ("%qs attribute without arguments on a non-prototype",
"nonnull");
*no_add_attrs = true; *no_add_attrs = true;
} }
return NULL_TREE; return NULL_TREE;
...@@ -6248,8 +6249,8 @@ handle_nonnull_attribute (tree *node, tree ARG_UNUSED (name), ...@@ -6248,8 +6249,8 @@ handle_nonnull_attribute (tree *node, tree ARG_UNUSED (name),
if (!get_nonnull_operand (TREE_VALUE (args), &arg_num)) if (!get_nonnull_operand (TREE_VALUE (args), &arg_num))
{ {
error ("nonnull argument has invalid operand number (argument %lu)", error ("%qs argument has invalid operand number (argument %lu)",
(unsigned long) attr_arg_num); "nonnull", (unsigned long) attr_arg_num);
*no_add_attrs = true; *no_add_attrs = true;
return NULL_TREE; return NULL_TREE;
} }
...@@ -6270,8 +6271,8 @@ handle_nonnull_attribute (tree *node, tree ARG_UNUSED (name), ...@@ -6270,8 +6271,8 @@ handle_nonnull_attribute (tree *node, tree ARG_UNUSED (name),
if (!argument if (!argument
|| TREE_CODE (argument) == VOID_TYPE) || TREE_CODE (argument) == VOID_TYPE)
{ {
error ("nonnull argument with out-of-range operand number " error ("%qs argument with out-of-range operand number "
"(argument %lu, operand %lu)", "(argument %lu, operand %lu)", "nonnull",
(unsigned long) attr_arg_num, (unsigned long) arg_num); (unsigned long) attr_arg_num, (unsigned long) arg_num);
*no_add_attrs = true; *no_add_attrs = true;
return NULL_TREE; return NULL_TREE;
...@@ -6279,8 +6280,8 @@ handle_nonnull_attribute (tree *node, tree ARG_UNUSED (name), ...@@ -6279,8 +6280,8 @@ handle_nonnull_attribute (tree *node, tree ARG_UNUSED (name),
if (TREE_CODE (argument) != POINTER_TYPE) if (TREE_CODE (argument) != POINTER_TYPE)
{ {
error ("nonnull argument references non-pointer operand " error ("%qs argument references non-pointer operand "
"(argument %lu, operand %lu)", "(argument %lu, operand %lu)", "nonnull",
(unsigned long) attr_arg_num, (unsigned long) arg_num); (unsigned long) attr_arg_num, (unsigned long) arg_num);
*no_add_attrs = true; *no_add_attrs = true;
return NULL_TREE; return NULL_TREE;
......
2019-06-24 Martin Sebor <msebor@redhat.com>
* c-typeck.c (build_binary_op): Hyphenate floating-point.
2019-06-10 Jakub Jelinek <jakub@redhat.com> 2019-06-10 Jakub Jelinek <jakub@redhat.com>
* c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN. * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
......
...@@ -11939,7 +11939,7 @@ build_binary_op (location_t location, enum tree_code code, ...@@ -11939,7 +11939,7 @@ build_binary_op (location_t location, enum tree_code code,
if (FLOAT_TYPE_P (type0) || FLOAT_TYPE_P (type1)) if (FLOAT_TYPE_P (type0) || FLOAT_TYPE_P (type1))
warning_at (location, warning_at (location,
OPT_Wfloat_equal, OPT_Wfloat_equal,
"comparing floating point with %<==%> or %<!=%> is unsafe"); "comparing floating-point with %<==%> or %<!=%> is unsafe");
/* Result of comparison is always int, /* Result of comparison is always int,
but don't convert the args to int! */ but don't convert the args to int! */
build_type = integer_type_node; build_type = integer_type_node;
......
2019-06-24 Martin Sebor <msebor@redhat.com>
* gcc.dg/Wfloat-equal-1.c: Adjust text of expected diagnostic.
* gcc.dg/misc-column.c: Ditto.
2019-06-23 Ian Lance Taylor <iant@golang.org> 2019-06-23 Ian Lance Taylor <iant@golang.org>
* go.test/test/blank1.go: Update for diagnostic message changes. * go.test/test/blank1.go: Update for diagnostic message changes.
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
double a, b; double a, b;
_Complex double c, d; _Complex double c, d;
int f(void) { return a == b; } /* { dg-warning "comparing floating point" } */ int f(void) { return a == b; } /* { dg-warning "comparing floating-point" } */
int g(void) { return c == d; } /* { dg-warning "comparing floating point" } */ int g(void) { return c == d; } /* { dg-warning "comparing floating-point" } */
int h(void) { return a != b; } /* { dg-warning "comparing floating point" } */ int h(void) { return a != b; } /* { dg-warning "comparing floating-point" } */
int i(void) { return c != d; } /* { dg-warning "comparing floating point" } */ int i(void) { return c != d; } /* { dg-warning "comparing floating-point" } */
...@@ -13,7 +13,7 @@ extern void bar(); ...@@ -13,7 +13,7 @@ extern void bar();
void foo (void) void foo (void)
{ {
if (a == b) /* { dg-warning "9:comparing floating point with" } */ if (a == b) /* { dg-warning "9:comparing floating-point with" } */
bar (); bar ();
if (p < q) /* { dg-warning "9:comparison of distinct pointer types" } */ if (p < q) /* { dg-warning "9:comparison of distinct pointer types" } */
......
...@@ -25,7 +25,7 @@ along with GCC; see the file COPYING3. If not see ...@@ -25,7 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "pretty-print.h" #include "pretty-print.h"
#define pp_unsupported_tree(PP, T) \ #define pp_unsupported_tree(PP, T) \
pp_verbatim (PP, "#%qs not supported by %s#", \ pp_verbatim (PP, "%qs not supported by %s", \
get_tree_code_name (TREE_CODE (T)), __FUNCTION__) get_tree_code_name (TREE_CODE (T)), __FUNCTION__)
#define pp_ti_abstract_origin(TI) ((tree *) (TI)->x_data) #define pp_ti_abstract_origin(TI) ((tree *) (TI)->x_data)
......
...@@ -631,7 +631,7 @@ release_defs_bitset (bitmap toremove) ...@@ -631,7 +631,7 @@ release_defs_bitset (bitmap toremove)
the verification errors. Their format strings don't follow GCC the verification errors. Their format strings don't follow GCC
diagnostic conventions and the calls are ultimately followed by diagnostic conventions and the calls are ultimately followed by
one to internal_error. */ one to internal_error. */
#if __GNUC__ > 10 #if __GNUC__ >= 10
# pragma GCC diagnostic push # pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wformat-diag" # pragma GCC diagnostic ignored "-Wformat-diag"
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment