Issue |
133380
|
Summary |
Clang fails to warn about deprecated volatile-qualified return type
|
Labels |
clang
|
Assignees |
|
Reporter |
siya100
|
Code :
volatile struct amber jurassic(); // Should warn (deprecated) — Clang misses this
void trex(volatile short left_arm, volatile short right_arm); // Clang warns (correct)
void fly(volatile struct pterosaur* pteranodon); // OK (no warning expected)
Expected Behavior:
Clang should emit a deprecation warning (-Wvolatile or similar) for the volatile return type in jurassic(), just as GCC does ([Godbolt link](https://godbolt.org/z/ajs7n8P7h)).
Actual Behavior:
Clang only warns about volatile parameters (e.g., trex) but silently accepts the deprecated volatile return type.
https://godbolt.org/z/ajs7n8P7h
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs