alexfh wrote: > > This diagnostic fires in the following code - > > https://gcc.godbolt.org/z/G6sYcTnWc: > > ... > > Is this expected? > > Yes. The prototype of `f` is using a `locally` defined struct (see the > `Wvisibility` diagnostic). So that type is ONLY visible on line 1.
Thanks for the explanation! Interestingly, neither of the two diagnostics is issued when compiling the code as C++, though I would expect this to be invalid C++ code. Any thoughts on how this works in C++? ... > IF this is your code, I'd suggest doing a forward-declaration of `struct > stat` outside of a function prototype. Yep, a forward declaration (or better `#include <sys/stat.h>`) before the first use of `struct stat` is needed to make this code unambiguously correct. https://github.com/llvm/llvm-project/pull/157364 _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
