rui314 / 9cc

A Small C Compiler
MIT License
1.83k stars 155 forks source link

Clean-up and missing function #17

Closed kvathupo closed 1 year ago

kvathupo commented 5 years ago

Changes to 9cc.h:

Removed redundant code by replacing code of the form:

typedef struct example;

typedef struct example {

 ...

 example *some_pntr;

 ...

} example

with the more comprehensible:

typedef struct example {

 ...

 struct example *some_pntr;

 ...

} example

Changed functions of the form

void no_arg_func();

to

void no_arg_func(void);

since the former is an identifer-list that potentially allows any number of arguments of any type. The latter does not allow any arguments.

EDIT:

Added missing

va_end()

in util.c