Skip to content

Conversation

pwaller
Copy link
Contributor

@pwaller pwaller commented Apr 17, 2020

When an empty macro definition is encountered, such as:

#define FOO

c-for-go would generate a constant whose name was equal to the printed
representation of name, which is a []byte. So you would see
something like [1 2 3 4 5] (except ascii values) appearing in a
go source where an IDENT was expected.

Instead, drop it, since a const without a value isn't a very interesting const.

When an empty macro definition is encountered, such as:

```c
#define FOO
```

c-for-go would generate a constant whose name was equal to the printed
representation of `name`, which is a `[]byte`. So you would see
something like `[1 2 3 4 5]` (except ascii values) appearing in a
`go` source where an IDENT was expected.

Instead, drop it, since a const without a value isn't a very interesting const.
@xlab xlab merged commit ce3604e into xlab:master Apr 17, 2020
@xlab
Copy link
Owner

xlab commented Apr 17, 2020

Thanks!

@pwaller pwaller deleted the patch-1 branch April 17, 2020 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants