diff options
author | Jason Merrill <jason@redhat.com> | 2003-12-19 22:21:25 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2003-12-19 22:21:25 -0500 |
commit | f3da0ead0c5c3772c8322cc4aad8deeb382ef2dd (patch) | |
tree | 9bb4e10d802613726fd9fcebe175b05cee831ce4 /gcc/stmt.c | |
parent | 46eb4b398948ddef881e51b9c49d96e242d56002 (diff) | |
download | gcc-f3da0ead0c5c3772c8322cc4aad8deeb382ef2dd.zip gcc-f3da0ead0c5c3772c8322cc4aad8deeb382ef2dd.tar.gz gcc-f3da0ead0c5c3772c8322cc4aad8deeb382ef2dd.tar.bz2 |
tree.c (get_unwidened): Decide whether to narrow a bitfield reference based on TYPE_SIZE...
* tree.c (get_unwidened): Decide whether to narrow a bitfield
reference based on TYPE_SIZE, not TYPE_PRECISION.
* cp/cvt.c (convert_to_void): Don't warn about the RHS of a comma
being useless if TREE_NO_UNUSED_WARNING is set.
* stmt.c (parse_output_constraint): Warn about in-out constraint
that doesn't allow a register.
(parse_input_constraint): Warn about matching constraint that
doesn't allow a register.
From-SVN: r74871
Diffstat (limited to 'gcc/stmt.c')
-rw-r--r-- | gcc/stmt.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -1254,6 +1254,9 @@ parse_output_constraint (const char **constraint_p, int operand_num, break; } + if (*is_inout && !*allows_reg) + warning ("read-write constraint does not allow a register"); + return true; } @@ -1269,6 +1272,7 @@ parse_input_constraint (const char **constraint_p, int input_num, const char *orig_constraint = constraint; size_t c_len = strlen (constraint); size_t j; + bool saw_match = false; /* Assume the constraint doesn't allow the use of either a register or memory. */ @@ -1320,6 +1324,8 @@ parse_input_constraint (const char **constraint_p, int input_num, char *end; unsigned long match; + saw_match = true; + match = strtoul (constraint + j, &end, 10); if (match >= (unsigned long) noutputs) { @@ -1384,6 +1390,9 @@ parse_input_constraint (const char **constraint_p, int input_num, break; } + if (saw_match && !*allows_reg) + warning ("matching constraint does not allow a register"); + return true; } |