(Hopefully) I've got an easy question this time: Why doesn't feof() 
(from stdio.h) use _CRTIMP?

If there is no _CRTIMP (aka dllimport) on the definition for feof, you 
get this when you call it:

   402cef:    call   402b90 <feof>

Note that this does NOT call the import.  Instead it calls this stub 
which *then* calls the import:

0000000000402b90 <feof>:
   402b90:    jmp    QWORD PTR [rip+0x57b6]        # 40834c <__imp_feof>

Yes, this will work.  But this unnecessary step is a waste of time. 
Adding _CRTIMP calls the import directly:

call   QWORD PTR [rip+0x5657]        # 40834c <__imp_feof>

Is this intentional?  Or a bug?

I'm asking about feof, but it appears there are a bunch of functions in 
stdio that don't have this (and a bunch that do).  If there's a pattern 
here, I don't see it.

dw


------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to