We have a large program which at link time produces the dreaded #10457-D warning.
I have studied the following threads
In one of these threads, it is stated
"If your program really uses both VLA and multiple threads, please understand that combination is not supported. The most we can do is detect that combination and issue the warning."
Why can't the compiler/linker provide some details about what is being detected? Is there something that we can look for in the various build artifacts, map file, etc that could provide us some clues? Is there some option we can provide to the compiler to list all of the VLAs it thinks that it encounters?
I attempted to isolate the causes of these warnings by stripping away code and libraries until the warning goes away, and then bring pieces back in (and those pieces and sub-pieces often need to be modified to further isolate code). The build times are slow, and our project is large all of which together results in a very arduous exercise. I got pretty far into it, but had to abandon the effort due to higher priority tasks that I was pulled into. I dread going back to it, especially since it has been a while.
Any ideas about how to more quickly isolate the causes of this warning will be much appreciated.
My memory is fuzzy, but I recall being able to isolate one cause of the warning, and it had to do with something like
char a[some_size]; where some_size was somethng like extern const uint16_t some_size;
This seems like a false positive, as a const is not variable. I ran an experiment where I removed the "extern", and just put something like
const uint16_t some_size = 30;
and the VLA warning went away. For a moment, I had my hopes up that this might be the sole source of the linker warning, but as soon as i brought in more code, the warning reappeared.
So now I am wondering how much of what is being detected as VLA is even real.
We are using the TI v20.2.1.LTS version of the compiler which according to the above related threads is not supposed to produce false positives.