[llvm-bugs] [Bug 30752] New: unwanted warnings in system headers using #line

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Oct 20 17:34:53 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=30752

            Bug ID: 30752
           Summary: unwanted warnings in system headers using #line
           Product: clang
           Version: 3.8
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: etienne at atnnn.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

System headers using #line don't ignore extra warning and error flags:

==> sys/line.h <==
#line 1 "foo.h"
foo();

==> sys/noline.h <==
foo();

==> test.c <==
#include <noline.h>
#include <line.h>

$ gcc -c -isystem sys -Wall test.c

$ clang -c -isystem sys -Wall test.c
In file included from test.c:2:
foo.h:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
foo();
^
1 warning generated.


This behaviour makes it harder to build and develop on the NixOS Linux
distribution which adds #line directives to many system headers.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20161021/5870f959/attachment.html>


More information about the llvm-bugs mailing list