standardese / cppast

Library to parse and work with the C++ AST
Other
1.69k stars 163 forks source link

(fix) GCC array bounds checking complaint #163

Closed CarlosNihelton closed 1 year ago

CarlosNihelton commented 1 year ago

GCC 12.2 is not convinced that dir will never be empty.

Since that's an exceptional situation that seems almost impossible to happen, I'm throwing an exception here.

Fixes https://github.com/foonathan/cppast/issues/160

foonathan commented 1 year ago

I didn't like the pragma, so I've just decided to support empty paths. Thanks for the PR, but it was quicker to do it myself :D