limit integer types to maximum bit width of 65535

closes #1541
This commit is contained in:
Andrew Kelley
2018-11-06 11:09:14 -05:00
parent a08b65720b
commit 63f636e7b7
14 changed files with 105 additions and 145 deletions

View File

@@ -7326,7 +7326,7 @@ void codegen_translate_c(CodeGen *g, Buf *full_path) {
import->di_file = ZigLLVMCreateFile(g->dbuilder, buf_ptr(src_basename), buf_ptr(src_dirname));
ZigList<ErrorMsg *> errors = {0};
int err = parse_h_file(import, &errors, buf_ptr(full_path), g, nullptr);
Error err = parse_h_file(import, &errors, buf_ptr(full_path), g, nullptr);
if (err == ErrorCCompileErrors && errors.length > 0) {
for (size_t i = 0; i < errors.length; i += 1) {
@@ -7446,7 +7446,7 @@ static void gen_root_source(CodeGen *g) {
return;
Buf *source_code = buf_alloc();
int err;
Error err;
// No need for using the caching system for this file fetch because it is handled
// separately.
if ((err = os_fetch_file_path(resolved_path, source_code, true))) {
@@ -7514,7 +7514,7 @@ void codegen_add_assembly(CodeGen *g, Buf *path) {
static void gen_global_asm(CodeGen *g) {
Buf contents = BUF_INIT;
int err;
Error err;
for (size_t i = 0; i < g->assembly_files.length; i += 1) {
Buf *asm_file = g->assembly_files.at(i);
// No need to use the caching system for these fetches because they