This is the mail archive of the mailing list for the binutils 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: [RFC] 2.22 release: Compilation failure for mingw32 target with --enable-targets=all

Hi Pierre,

   To be honest, I don't understand the difference between
'const char * const *' and 'char * const *' types anyway...

I get confused by this sort of thing as well. I think that correct interpretation is:

"const char * const *" is a fixed pointer to a fixed pointer to a byte.

"char * const *" is a fixed pointer to a modifiable pointer to a byte.

> 2: note: expected 'const char * const*' but argument is of type 'char > * const*'
> make[3]: *** [eelf32_spu.o] Error 1
> I got no comment on that part of the email back then, and I still
> don't know if this should be considered as an error in mingw32
> declarations or if it should be fixed in Binutils sources.
> I would like to know if this warning should be corrected or not...

I guess that mingw32 is free to define system headers as it so chooses. If however it is attempting to be POSIX compatible then it should follow the POSIX standard for the execvp() function and prototype it as:

int execvp(const char *path, char *const argv[]);

Ie, the binutils are correct and mingw32 ought to be changed. I suspect however that the mingw32 project will not want to change their header, so the best compromise would be to fix the binutils.

You could change the cast in spu_elf_relink() to be "(void *)" but this is rather hacky. You could add a configure time test of the prototype of execvp() and conditionalize the cast in spu_elf_relink to match the required poitner type. But this seems a bit heavy handed. I am not sure what is best really.


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