|
From: | Riley Wood |
Subject: | Re: [bug-cflow] CFlow 1.4 mistakes cast to fixed size array of custom type for a function call. |
Date: | Tue, 21 Feb 2017 18:25:30 -0500 |
I noticed today that CFlow was claiming that my function called...a type.Here is the equivalent code snippetvoid my_func(const my_type an_array[ARRAY_LEN]){x = (my_type (*)[ARRAY_LEN])an_array;}The cflow graph shows "my_func" calling into "my_type", which is of course not right. I believe this may be because it interprets the (*) which appears after my_type as the open/close parens of a function call. I'm curious to know if you can duplicate this on your setup.The following code will trigger the bug:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ some_type_t (*x)[10];int main() {some_type_t my_ints[10];x = (some_type_t (*)[10]) my_ints;(void)(x);}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cflow output:main() <int main () at cflow_bug.c:4>:some_type_t()If the typedef for some_type_t appears in the same file, the problem goes away. So it appears to be an issue when it cannot resolve the type and therefore assumes it's a function? Maybe?--Riley WoodSoftware Engineer
ClearMotion
475 Wildwood Ave.
Woburn, MA 01801Cell: 914-874-7315address@hidden
---
Statement of Confidentiality
This email and any files transmitted with it are confidential (whether individually marked or not) and intended solely for the use of the individual or entity to whom they are addressed.
[Prev in Thread] | Current Thread | [Next in Thread] |