projects
/
m6w6
/
ext-psi
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
basic support for builtins
[m6w6/ext-psi]
/
src
/
types
/
const.c
diff --git
a/src/types/const.c
b/src/types/const.c
index 1afbac029c85a09bf25c87394d946640868876c1..b839d5f701897aa952fd2e7b6a24585942e63b05 100644
(file)
--- a/
src/types/const.c
+++ b/
src/types/const.c
@@
-58,7
+58,9
@@
void psi_const_free(struct psi_const **constant_ptr)
void psi_const_dump(int fd, struct psi_const *cnst)
{
dprintf(fd, "const ");
void psi_const_dump(int fd, struct psi_const *cnst)
{
dprintf(fd, "const ");
- psi_impl_type_dump(fd, cnst->type);
+ if (cnst->type) {
+ psi_impl_type_dump(fd, cnst->type);
+ }
dprintf(fd, " %s = ", cnst->name->val);
psi_impl_def_val_dump(fd, cnst->val);
dprintf(fd, ";");
dprintf(fd, " %s = ", cnst->name->val);
psi_impl_def_val_dump(fd, cnst->val);
dprintf(fd, ";");