================
@@ -1658,6 +1682,12 @@ Sema::ActOnFinishSwitchStmt(SourceLocation SwitchLoc, 
Stmt *Switch,
         << CondExpr->getSourceRange();
     }
 
+    // Check the relocated case values with their local values from here.
----------------
4ast wrote:

The error for the same enumerator twice is gone:

```c
  case B:
    return 3;
  case B:
    return 5;
```

Both labels get the same relocation, so they are equal on every kernel. The 
second label is never taken and clang is silent. With the attribute in 
`vmlinux.h` every prog loses this check.
I guess this is acceptable? Add to a doc.

https://github.com/llvm/llvm-project/pull/243338
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to