Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The "#define" information in the Makefile will be recognized as unrecognized token #526

Open
Ivanbeethoven opened this issue Nov 13, 2023 · 1 comment
Labels
bug Something isn't working Feature: accuracy Able to parse and understand more scenarios
Milestone

Comments

@Ivanbeethoven
Copy link

This example comes from AFL: https://github.com/google/AFL

This "#define" does not exist in the C code, but is passed in through the compiler command in the Makefile file.
An error is still reported after being recognized by the makefile.
It seems that define was indeed recognized and expanded, but an error occurred

image

Here is my .vscode/c_cpp_properties.json:

{
    "configurations": [
        {
            "name": "Linux",
            "includePath": [
                "${workspaceFolder}/**"
            ],
            "defines": [],
            "compilerPath": "/usr/bin/gcc",
            "cStandard": "c11",
            "intelliSenseMode": "linux-gcc-x64",
            "configurationProvider": "ms-vscode.makefile-tools"
        }
    ],
    "version": 4
}

I have temporarily made the following modifications to alleviate this error:

{
      "configurations": [
        {
          "name": "Linux",
          "includePath": [
            "${workspaceFolder}/**"
          ],
          "defines": [],
          "compilerPath": "/usr/bin/gcc",
          "cStandard": "c99",
          "intelliSenseMode": "linux-gcc-x64",
          "compilerArgs": [
              "-O3",
              "-funroll-loops",
              "-Wall",
              "-D_FORTIFY_SOURCE=2",
              "-g",
              "-Wno-pointer-sign",
              "-DAFL_PATH=\"$(HELPER_PATH)\"",
              "-DDOC_PATH=\"$(DOC_PATH)\"",
              "-DBIN_PATH=\"$(BIN_PATH)\""
            ]
          }
      ],
      "version": 4
}
@gcampbell-msft
Copy link
Collaborator

@Ivanbeethoven Thank you for bringing this to our attention and pointing us to the project that it's happening in!

Since there is a reasonable workaround, this might not get fixed immediately (in the next release), but we will definitely put it on the backlog to investigate a fix for an upcoming release. Thanks!

@gcampbell-msft gcampbell-msft added bug Something isn't working Feature: accuracy Able to parse and understand more scenarios and removed triage labels Nov 17, 2023
@gcampbell-msft gcampbell-msft modified the milestones: Backlog, On Deck Nov 17, 2023
@gcampbell-msft gcampbell-msft modified the milestones: On Deck, Backlog Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Feature: accuracy Able to parse and understand more scenarios
Projects
None yet
Development

No branches or pull requests

2 participants