On Tue, 21 Jun 2022, David Malcolm via Gcc wrote: > So ultimately that's something we want to fix, though exactly how, I'm > not quite sure; we presumably want to look up the target's definitions > of those macros - but I don't think the analyzer has access to the > cpp_reader instance from the frontend.
Normally that would use a target hook to specify the values of those macros. The default would be the traditional Unix values of 0, 1, 2 for O_RDONLY, O_WRONLY, O_RDWR, while Hurd would need its own definition of the hook to use values 1, 2, 3 (I don't know if there are any non-Hurd systems not using the traditional values). -- Joseph S. Myers jos...@codesourcery.com