- changed status to duplicate
Rule T019 and OpenMP
Issue #53
resolved
If we have code such as:
int k;
#ifdef _OPENMP
#pragma omp parallel for \
private(k)
#endif /*_OPENMP*/
for(k = 0; k < 10; k++)
{
// ...
}
we have got in the report something like:
<vera>
<file name="example.cpp">
<report rule="T019" line="92">
![CDATA[full block {} expected in the control structure]]
</report>
</file>
</vera>
The "#pragma omp parallel for" is seen as a standard "for" loop.
Regards, Philippe.
Comments (6)
-
-
reporter I think it is not a duplicate of
#48: in the code i provided to illustrate this issue, there is no white space after the "for" keyword (loop on "k") and there is one in the precompiler code (which is split on 2 lines).I think that the easier and most generic way to get rid of such some problems should be to make the parser ignore precompiler code (the same way it is done for comments).
-
reporter - changed status to open
I don't think it is the same as
#48. More details in my comment. -
I confirm this is not a duplicate - sorry for that!
-
- changed status to resolved
make T019 support openmp 'for' - fix
#53→ <<cset 34415c6659d4>>
-
reporter That's ok. Nice reactivity!
- Log in to comment
Duplicate of
#48.