On 10/29/2015 10:49 AM, David Malcolm wrote:
tree-nested.c has this code:

   2333              for (c = gimple_omp_taskreg_clauses (stmt);
   2334                   c;
   2335                   c = OMP_CLAUSE_CHAIN (c))
   2336                if ((OMP_CLAUSE_CODE (c) == OMP_CLAUSE_FIRSTPRIVATE
   2337                     || OMP_CLAUSE_CODE (c) == OMP_CLAUSE_SHARED)
   2338                    && OMP_CLAUSE_DECL (c) == decl)
   2339                  break;
   2340                if (c == NULL && gimple_code (stmt) != GIMPLE_OMP_TARGET)
   2341                  {

which leads to this warning from -Wmisleading-indentation
(justifiably, in my opinion):

../../../src/gcc/tree-nested.c: In function ‘tree_node* 
convert_tramp_reference_stmt(gimple_stmt_iterator*, bool*, walk_stmt_info* ’:
../../../src/gcc/tree-nested.c:2340:8: error: statement is indented as if it 
were guarded by... [-Werror=misleading-indentation]
         if (c == NULL && gimple_code (stmt) != GIMPLE_OMP_TARGET)
         ^
../../../src/gcc/tree-nested.c:2333:6: note: ...this ‘for’ clause, but it is not
       for (c = gimple_omp_taskreg_clauses (stmt);
       ^

This patch fixes the indentation of lines 2340-2360 to make it clear
that they're not part of the "for" loop.

gcc/ChangeLog:
        * tree-nested.c (convert_tramp_reference_stmt): Fix indentation.
OK.
jeff

Reply via email to