On 10/20/2015 10:17 AM, Marek Polacek wrote:
The function is_cilkplus_vector_p is defined both in c-parser.c and parser.c
and is exactly the same so it seems that it should rather be defined in the
common Cilk+ code (even though for such a small static inline fn it probably
doesn't matter much). While at it, fix some typos and simplify the code a bit.
Bootstrapped/regtested on x86_64-linux, ok for trunk?
2015-10-20 Marek Polacek <pola...@redhat.com>
* array-notation-common.c (is_cilkplus_vector_p): Define.
* c-common.h (is_cilkplus_vector_p): Declare.
* c-parser.c (is_cilkplus_vector_p): Don't define here.
* parser.c (is_cilkplus_vector_p): Don't define here.
OK.
In fact, I think refactoring a routine that is obviously identical
between the C/C++ front-ends and dropping it into c-family/ ought to be
considered pre-approved.
jeff