mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-25 13:11:00 +00:00
[qfcc] Avoid ubsan related warning with lto
I'm not sure what's up (I doubt it's actually ub, it's just that it took enabling ubsan *and* link-time-optimizations to see the warning), and the warning is technically correct, though going from -1 (int) to 0xfffffff400000000 has me stumped, but ensuring width is 2-4 does take care of it. All because I got a weird test failure that I wound up being unable to reproduce after rebuilding qfcc (thus the ubsan pass, but no other sniffles).
This commit is contained in:
parent
186a781121
commit
e09f97685f
1 changed files with 1 additions and 1 deletions
|
@ -1706,7 +1706,7 @@ build_vector_struct (type_t *type)
|
|||
auto ele_type = base_type (type);
|
||||
int width = type_width (type);
|
||||
|
||||
if (!ele_type || width < 2) {
|
||||
if (!ele_type || width < 2 || width > 4) {
|
||||
internal_error (0, "%s not a vector type: %p %d", type->name, ele_type, width);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue