> >> int bar(void)
> >> {
> >> int a[foo()];
> >> ...
> >> }
>
> I guess it is a bug in lint? Is there a directive
> I can use to suppress lint warning in this case?
Seems simpler to workaround it by doing:
int bar(void)
{
int acnt = foo();
int a[acnt];
Joerg Schilling wrote:
>> int foo(void)
>> {
>> ...
>> }
>>
>> int bar(void)
>> {
>> int a[foo()];
>> ...
>> }
> Variable length arrays do not help to avoid stack overflows.
> VLAs should not be used if you don't know at compile time that the
> actual size will always be within reasona
Kacheong Poon wrote:
> I have a question about lint warning on the following code.
>
> int foo(void)
> {
> ...
> }
>
> int bar(void)
> {
> int a[foo()];
> ...
> }
>
> Lint complains that the return value of foo() is ignored.
> Isn't the above a valid way to use the variable-length
> arr
Kacheong Poon wrote:
> I have a question about lint warning on the following code.
>
> int foo(void)
> {
> ...
> }
>
> int bar(void)
> {
> int a[foo()];
> ...
> }
>
> Lint complains that the return value of foo() is ignored.
> Isn't the above a valid way to use the variable-length
> array
I have a question about lint warning on the following code.
int foo(void)
{
...
}
int bar(void)
{
int a[foo()];
...
}
Lint complains that the return value of foo() is ignored.
Isn't the above a valid way to use the variable-length
array feature (assuming it will not cause stack overflo