On Thu, Sep 19, 2024 at 10:59:15AM -0400, Chet Ramey wrote:
> On 9/19/24 4:25 AM, Michel Lind wrote:
> > Hi,
> > 
> > In Fedora we have been shipping GCC 14 since Fedora 40; it turns out
> > that at this moment we can no longer compile against readline since
> > including readline.h failed, as FILE is defined in stdio.h and that is
> > no longer included by default.
> 
> What does this mean? readline.h has never included stdio.h; it's an
> application requirement to do this, and it's documented that way. Are
> you saying that gcc pre-14 would implicitly include stdio.h itself?
> 
In GCC pre-14 FILE is somehow available - and now that's no longer the
case.

But yes, this seems to be a bug in the application (in my case, jimtcl;
in the original reporter's case the application was not named so I'm not
sure what it was) - as you correctly point out the readline info page
does say

"""
   Before declaring any functions that customize Readline's behavior, or
using any functionality Readline provides in other code, an application
writer should include the file '<readline/readline.h>' in any file that
uses Readline's features.  Since some of the definitions in 'readline.h'
use the 'stdio' library, the file '<stdio.h>' should be included before
'readline.h'.
"""

So I suspect stdio.h was transitively included via some other paths in
jimtcl and some other applications, and in GCC 14 that suddenly breaks.

Thanks - and sorry for the noise!

Best regards,

-- 
 _o) Michel Lind
_( ) identities: https://keyoxide.org/5dce2e7e9c3b1cffd335c1d78b229d2f7ccc04f2

Attachment: signature.asc
Description: PGP signature

Reply via email to