https://bugs.kde.org/show_bug.cgi?id=372286

            Bug ID: 372286
           Summary: C Parser fails to parse headers and reports errors
           Product: kdevelop
           Version: 5.0.2
          Platform: Fedora RPMs
                OS: Linux
            Status: UNCONFIRMED
          Severity: major
          Priority: NOR
         Component: Language Support: CPP (Clang-based)
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Created attachment 102156
  --> https://bugs.kde.org/attachment.cgi?id=102156&action=edit
screenshot

With this code:

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

int main() {
  FILE *fil;
  char filename[];

  fil = fopen(filename, "rb");
  if(fil == NULL) {
    printf("No file found\n");
    return 0;
  }
  fclose(fil);
  return 1;
}

Parser reports:
Use of undeclared identifier 'FILE'
Implicit declarations of functions fopen, fclose, printf

Parser suggest to include stdio.h and stdlib.h as if they were not found,
however the mouseover on the #include, the box reports correctly all the
declarations found in the headers 

Reproducible: Always

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to