aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vectorizer.h
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2023-06-05 18:30:12 +0200
committerIain Buclaw <ibuclaw@gdcproject.org>2023-06-05 18:49:37 +0200
commit3ad9313a2e28287aa350d9dc3ea7746d8302662d (patch)
treed4e55b4d72f35dc9181c44e5938ea617305fb287 /gcc/tree-vectorizer.h
parent108ff03bac3c440db792fcc61d6247e75b56a572 (diff)
downloadgcc-3ad9313a2e28287aa350d9dc3ea7746d8302662d.zip
gcc-3ad9313a2e28287aa350d9dc3ea7746d8302662d.tar.gz
gcc-3ad9313a2e28287aa350d9dc3ea7746d8302662d.tar.bz2
d: Warn when declared size of a special enum does not match its intrinsic type.
All special enums have declarations in the D runtime library, but the compiler will recognize and treat them specially if declared in any module. When the underlying base type of a special enum is a different size to its matched intrinsic, then this can cause undefined behavior at runtime. Detect and warn about when such a mismatch occurs. gcc/d/ChangeLog: * gdc.texi (Warnings): Document -Wextra and -Wmismatched-special-enum. * implement-d.texi (Special Enums): Add reference to warning option -Wmismatched-special-enum. * lang.opt: Add -Wextra and -Wmismatched-special-enum. * types.cc (TypeVisitor::visit (TypeEnum *)): Warn when declared special enum size mismatches its intrinsic type. gcc/testsuite/ChangeLog: * gdc.dg/Wmismatched_enum.d: New test.
Diffstat (limited to 'gcc/tree-vectorizer.h')
0 files changed, 0 insertions, 0 deletions