https://llvm.org/bugs/show_bug.cgi?id=31796
Bug ID: 31796 Summary: clang 3.9.1 fails to reject or even warn about some forms of assignments to const struct fields Product: clang Version: 3.9 Hardware: PC OS: All Status: NEW Severity: normal Priority: P Component: -New Bugs Assignee: unassignedclangb...@nondot.org Reporter: mar...@dsl-only.net CC: llvm-bugs@lists.llvm.org Classification: Unclassified [The context for this was FreeBSD head -r312942 and so its clang 3.9.1 variant.] clang 3.9.1 in FreeBSD allows the following to compile without complaint, even with -Wpedantic : (Note the const between the * and the desc.) struct mlx5_core_diagnostics_entry { const char *const desc; unsigned short counter_id; } empty; int main () { struct mlx5_core_diagnostics_entry test; test = empty; } gcc6, by contrast, rejects the assignment as an error. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs