Add parentheses to clarify precedence between operators [PR106907]
Checks
Context |
Check |
Description |
linaro-tcwg-bot/tcwg_gcc_build--master-arm |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 |
success
|
Testing passed
|
Commit Message
PR106907 has few warnings spotted from cppcheck. Inorder to clarify the
order of precedence between operators added parentheses to explicitly
group operations based on desired order of evaluation.
2023-06-07 Jeevitha Palanisamy <jeevitha@linux.ibm.com>
gcc/
PR target/106907
* config/gcn/gcn.cc (gcn_hsa_declare_function_name): Add parentheses
to group the operations.
@@ -6300,7 +6300,7 @@ gcn_hsa_declare_function_name (FILE *file, const char *name, tree)
fprintf (file, "\t .amdhsa_system_vgpr_workitem_id\t%i\n",
(cfun->machine->args.requested & (1 << WORK_ITEM_ID_Z_ARG))
? 2
- : cfun->machine->args.requested & (1 << WORK_ITEM_ID_Y_ARG)
+ : (cfun->machine->args.requested & (1 << WORK_ITEM_ID_Y_ARG))
? 1 : 0);
fprintf (file,
"\t .amdhsa_next_free_vgpr\t%i\n"