commit 30feebeac1f5fe74efaf305468fdc332e1b9ee0e
Author:     Roberto E. Vargas Caballero <[email protected]>
AuthorDate: Thu Feb 23 09:27:32 2017 +0100
Commit:     Roberto E. Vargas Caballero <[email protected]>
CommitDate: Thu Feb 23 09:27:32 2017 +0100

    [cc1] Set base type of voidtype
    
    pvoidtype is a function that should be not dereferenced,
    but there is a few places in the code where it is to
    do some semantic tests, and having a pointer without
    base type is a bit dangerous

diff --git a/cc1/arch/amd64-sysv/arch.c b/cc1/arch/amd64-sysv/arch.c
index 2899034..ba5d7ea 100644
--- a/cc1/arch/amd64-sysv/arch.c
+++ b/cc1/arch/amd64-sysv/arch.c
@@ -39,6 +39,7 @@ static Type types[] = {
                .op = PTR,
                .letter = L_POINTER,
                .prop = TDEFINED,
+               .type = &types[5],  /* chartype */
                .size = 8,
                .align = 8,
        },
diff --git a/cc1/arch/i386-sysv/arch.c b/cc1/arch/i386-sysv/arch.c
index 64ab6b2..fd73eba 100644
--- a/cc1/arch/i386-sysv/arch.c
+++ b/cc1/arch/i386-sysv/arch.c
@@ -39,6 +39,7 @@ static Type types[] = {
                .op = PTR,
                .letter = L_POINTER,
                .prop = TDEFINED,
+               .type = &types[5],  /* chartype */
                .size = 4,
                .align = 4,
        },
diff --git a/cc1/arch/qbe/arch.c b/cc1/arch/qbe/arch.c
index 18852bf..01e2410 100644
--- a/cc1/arch/qbe/arch.c
+++ b/cc1/arch/qbe/arch.c
@@ -39,6 +39,7 @@ static Type types[] = {
                .op = PTR,
                .letter = L_POINTER,
                .prop = TDEFINED,
+               .type = &types[5], /* char type */
                .size = 8,
                .align = 8,
        },
diff --git a/cc1/arch/z80/arch.c b/cc1/arch/z80/arch.c
index f7b50b5..b5e31f3 100644
--- a/cc1/arch/z80/arch.c
+++ b/cc1/arch/z80/arch.c
@@ -39,6 +39,7 @@ static Type types[] = {
                .op = PTR,
                .letter = L_POINTER,
                .prop = TDEFINED,
+               .type = &types[5], /* char type */
                .size = 2,
                .align = 2,
        },

Reply via email to