This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/2] fix compile errors for efgcvt.c


On Wed, Jul 24, 2019 at 4:25 PM Corinna Vinschen <vinschen@redhat.com> wrote:
> Why does your patch arbitrarily move the gcvt function?  There's
> no functional change, so this move should not be part of the patch.

The movement is the core of this patch.

When efgcvt.c is compiled under some specific conditions,
gcvt's function prototype is NOT provided by stdlib.h.
(Its prototype is gurded by macros)

If gcvt is below gcvtf, gcvt is implicitly declared as int
since gcvtf calls gcvt.
The implicit declaration is not compatible with its actual type.

So the possible options will be:
- To move gcvt above gcvtf, or
- To declare gcvt's prototype above gcvtf.

Should I choose 2nd option?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]