Closed Machiry closed 4 years ago
Consider the following code:
#define ulong unsigned long ulong * TOP; ulong channelColumns; void DescribeChannel(void) { ulong col; TOP = (ulong *)malloc((channelColumns+1) * sizeof(ulong)); TOP[col] = 0; }
When you run with alltypes: ./cconv-standalone -alltypes <foo.c>, you get the following:
alltypes
./cconv-standalone -alltypes <foo.c>
#define ulong unsigned long _Array_ptr<unsigned long> TOP = ((void * TOP)0); ulong channelColumns; void DescribeChannel(void) { ulong col; TOP = (_Array_ptr<unsigned long> )malloc((channelColumns+1) * sizeof(ulong)); TOP[col] = 0; }
See the invalid cast:
_Array_ptr<unsigned long> TOP = ((void * TOP)0);
This has to be:
_Array_ptr<unsigned long> TOP = ((void *)0);
Some issue with the latest DeclRewriter refactoring.
I think this is much older. See b960a3bcfd53369888888d4fd874045336910341 at the latest, but I think it goes back farther.
Consider the following code:
When you run with
alltypes
:./cconv-standalone -alltypes <foo.c>
, you get the following:See the invalid cast:
This has to be:
Some issue with the latest DeclRewriter refactoring.