janestreet / bin_prot

Binary protocol generator
MIT License
73 stars 21 forks source link

Use the cpp `##` concatenation operator in the macros instead of `/**/` #1

Closed avsm closed 11 years ago

avsm commented 11 years ago

Some newer cpps introduce a space with the latter operator, which breaks the build. The concatention operator should be used to combine tokens together, and guarantees that there won't be any whitespace introduced.

ghost commented 11 years ago

It doesn't play well with -traditional. I'll try to find out why we use this switch for cpp.

avsm commented 11 years ago

It's best to stop using -traditional and go with the modern cpp convention.

The reason this breaks in the latest MacOS X is that it uses the Clang cpp, which has dropped support for traditional: https://wiki.freebsd.org/PortsAndClang/CppIssues

Unfortunately, they don't error out when -traditional is specified, and happily add whitespace to tokens.

ghost commented 11 years ago

Fixed in 109.30.00.