Skip to content

(C) VLA recognized as a bug in v1.8.0-insiders2 #8581

@patrykkozuch

Description

@patrykkozuch

Bug type: Language Service - Intellisens recognizes VLA as a bug

Describe the bug

  • OS and Version: Windows 11
  • VS Code Version: 1.63.2
  • C/C++ Extension Version: v1.8.0-insiders2

Steps to reproduce
After creating VLA in C (C89 standard) IntelliSense marks every use of Variable Length Arrays as an error.

Code sample and logs

#include <stdlib.h>
#include <stdio.h>

void bubblesort(int k, int n, char p1[][k]); /* Line marked as "a parameter is not allowed" */

int main(void)
{
    int n, l;
    scanf(" %d", &n);
    scanf(" %d", &l);

    char tab[n][l]; /*This line is marked as "expression must have constant value" */
    return 0;
}
  • Configurations in c_cpp_properties.json: none

Additional context
It works well with v1.7.1, but after switching to Insiders channel IntelliSense shows errors.

Metadata

Metadata

Assignees

Labels

Language ServicebugfixedCheck the Milestone for the release in which the fix is or will be available.regressionA bug that didn't exist in a previous release

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions