[LLVMbugs] [Bug 19269] New: Missing warning for "char* foo, bar;"

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Mar 27 16:23:22 PDT 2014


            Bug ID: 19269
           Summary: Missing warning for "char* foo, bar;"
           Product: clang
           Version: 3.4
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: htam at apple.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

There is currently no warning for declaring two variables of pointer type in
the same declaration where the user forgets the second asterisk.

extern int foo(int);
extern int foo(int*);

int bar() {
  char* a, b;
  return foo(a) + foo(b);

Clang should emit a warning that b was probably supposed to be a pointer.

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/20140327/08cf05f5/attachment.html>

More information about the llvm-bugs mailing list