mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-25 13:11:00 +00:00
[qfcc] Support type expressions in default_type
Needed for using type expressions in casts (eg in generic functions).
This commit is contained in:
parent
b2049f496b
commit
c8158f9ebe
1 changed files with 2 additions and 2 deletions
|
@ -538,7 +538,7 @@ default_type (specifier_t spec, const symbol_t *sym)
|
||||||
spec.type = &type_uint;
|
spec.type = &type_uint;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else if (!spec.type_expr) {
|
||||||
if (spec.is_long) {
|
if (spec.is_long) {
|
||||||
if (spec.is_unsigned) {
|
if (spec.is_unsigned) {
|
||||||
spec.type = type_ulong_uint;
|
spec.type = type_ulong_uint;
|
||||||
|
@ -553,7 +553,7 @@ default_type (specifier_t spec, const symbol_t *sym)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!spec.type) {
|
if (!spec.type && !spec.type_expr) {
|
||||||
spec.type = type_default;
|
spec.type = type_default;
|
||||||
if (sym) {
|
if (sym) {
|
||||||
warning (0, "type defaults to '%s' in declaration of '%s'",
|
warning (0, "type defaults to '%s' in declaration of '%s'",
|
||||||
|
|
Loading…
Reference in a new issue