pantoniou / libfyaml

Fully feature complete YAML parser and emitter, supporting the latest YAML spec and passing the full YAML testsuite.
MIT License
241 stars 74 forks source link

`#warn` is an invalid preprocessing directive #30

Closed nektro closed 10 months ago

nektro commented 3 years ago

https://github.com/pantoniou/libfyaml/blob/cd04f85/src/lib/fy-parse.c#L40

error(compilation): clang failed with stderr: ./libfyaml/src/lib/fy-parse.c:40:2: error: invalid preprocessing directive
nisalb commented 3 years ago

I assume this is a typo. The author must have meant the #warning directive. Isn't it?

nektro commented 3 years ago

https://gcc.gnu.org/onlinedocs/cpp/Diagnostics.html

yes, there is #error and #warning.

pantoniou commented 3 years ago

Known issue, will fix, however the real problem is that VERSION is not defined. This used to happen when using tarballs from github.

Are you sure this happens on master?

nektro commented 3 years ago

That was my bad then, at the time I was writing a custom build script and just totally missed that defining VERSION would've fixed it.

pantoniou commented 3 years ago

That was my bad then, at the time I was writing a custom build script and just totally missed that defining VERSION would've fixed it.

No worries.

I know of the bogus #warn but left it there so I can catch the undefined VERSION problem, it used to be happening quite often.

Cheers...

pantoniou commented 10 months ago

77fb75287a17f0c55728eb80ababfaf1a50ca36d fixes that.