http://llvm.org/bugs/show_bug.cgi?id=7280

           Summary: Clang emits warning instead of error for non-void
                    return without value
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


int test1() {
  return;
}

daysthatwere:clang rjmccall$ clang /tmp/red.c
/tmp/red.c:2:3: warning: non-void function 'test1' should return a value
      [-Wreturn-type]
  return;
  ^

This should really be a hard error.  I would change this in a heartbeat, but
I'm not sure what motivated us to implement it as a warning in the first place.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to