skvadrik / re2c

Lexer generator for C, C++, Go and Rust.
https://re2c.org
Other
1.07k stars 169 forks source link

commas at the end of enumerator lists #395

Closed neil-edelman closed 2 years ago

neil-edelman commented 2 years ago

warning: commas at the end of enumerator lists are a C99-specific feature [-Wc99-extensions] yycparam_begin,

When compiling the generated sources in C90. This was added to C99 primarily for exactly this purpose, but it would be nice to have a clean compile in C90.

skvadrik commented 2 years ago

Hi, thanks for reporting. Here is a fix: https://github.com/skvadrik/re2c/commit/9a143f45bee631960edd0121ecf05f188c8291f2. Please note that it is better to include a source code example and instructions how to run re2c (it is easy to guess in this case because re2c generates an enum only for C and only in one place).