[llvm-commits] [PATCH] fix illegal impicit cast from const void* to void*

Joerg Sonnenberger joerg at britannica.bec.de
Sat Mar 3 14:56:13 PST 2012


On Sat, Mar 03, 2012 at 11:14:33PM +0100, John Spencer wrote:
> more context:
> void* DynamicLibrary::SearchForAddressOfSymbol(const char
> *symbolName) calls the macro
> 
> EXPLICIT_SYMBOL
> 
> to return a (void*) pointer to a FILE* from a named argument which
> is either stderr, stdin, or stdout.
> 
> the musl libc defines these symbols as const FILE* (which is
> perfectly legal), so the implicit cast to void* fails.

Is it really legal? stdin and friends are supposed to be passed to
functions taking FILE * as argument, so it would force const violations
all the time.

Joerg



More information about the llvm-commits mailing list