This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[hsa-branch] Minor tweak to HSA_SORRY macros
- From: Martin Jambor <mjambor at suse dot cz>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 21 Jul 2016 13:57:43 +0200
- Subject: [hsa-branch] Minor tweak to HSA_SORRY macros
- Authentication-results: sourceware.org; auth=none
Hi,
the whole point of having HSA_SORRY be encapsulated in a rather useless
while statement is to enforce a semicolon after its each expansion, like
if it was a function. To my surprise, I found the semicolon is already
there and missing at two invocation points. I plan to change the macro
to be different on the hsa branch and fix it there and to minimize the
difference I'd like to commit this to trunk eventualy.
Thanks,
Martin
2016-07-21 Martin Jambor <mjambor@suse.cz>
* hsa-gen.c (HSA_SORRY_ATV): Remove semicolon after macro.
(HSA_SORRY_AT): Likewise.
(omp_simple_builtin::generate): Add missing semicolons.
---
gcc/hsa-gen.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gcc/hsa-gen.c b/gcc/hsa-gen.c
index 24cc2c7..6accbd7 100644
--- a/gcc/hsa-gen.c
+++ b/gcc/hsa-gen.c
@@ -69,7 +69,7 @@ along with GCC; see the file COPYING3. If not see
HSA_SORRY_MSG)) \
inform (location, message, __VA_ARGS__); \
} \
- while (false);
+ while (false)
/* Same as previous, but highlight a location. */
@@ -81,7 +81,7 @@ along with GCC; see the file COPYING3. If not see
HSA_SORRY_MSG)) \
inform (location, message); \
} \
- while (false);
+ while (false)
/* Default number of threads used by kernel dispatch. */
@@ -4379,11 +4379,11 @@ omp_simple_builtin::generate (gimple *stmt, hsa_bb *hbb)
if (m_sorry)
{
if (m_warning_message)
- HSA_SORRY_AT (gimple_location (stmt), m_warning_message)
+ HSA_SORRY_AT (gimple_location (stmt), m_warning_message);
else
HSA_SORRY_ATV (gimple_location (stmt),
"Support for HSA does not implement calls to %s\n",
- m_name)
+ m_name);
}
else if (m_warning_message != NULL)
warning_at (gimple_location (stmt), OPT_Whsa, m_warning_message);
--
2.9.0