https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56659

--- Comment #9 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Tobias Burnus from comment #8)
>   f951: Warning: Include directory ‘foo/bar/’: Permission denied
>   <built-in>: Error: foo/bar: Permission denied
> 
> (The <built-in> shows up when entering a file but the file is not yet there.
> Not ideal,
> but not that quick to fix. Once the file is read, that's replaced by the
> file name and line number. Still, the <built-in> issue should be fixed
> eventually.)

Hi Tobias,

Are you sure the Error is produced *after* entering the file (by entering I
mean pushing the file into the include stack and thus updating the line-map).
If so, then the line-maps are not correctly named and the diagnostic wants to
print some filename but the line-map or the include stack says that the name of
the file is <built-in>.

But it could also be that the Error is produced *before* entering the file.
Then, the bug is that something else has pushed the <built-in> context into the
line-map stack. This should be command-line context and produce:

f951: Error: foo/bar: Permission denied

or:

<command-line>: Error: foo/bar: Permission denied

In either case, this points to some mess in the line-map stack.

Reply via email to