[pypy-dev] MSVC "too many initializer" problem

Armin Rigo arigo at tunes.org
Sat Jul 29 09:21:52 CEST 2006

Hi Scott,

On Sat, Jul 29, 2006 at 12:48:46AM -0400, Scott Dial wrote:
> Right now, if I were to enter the translatorshell and try to compile any 
> of the snippets I will get an the following error:
> testing_1.c(2318) : warning C4047: 'initializing' : 'char *' differs in 
> levels of indirection from 'int'
> testing_1.c(2318) : error C2078: too many initializers

Indeed, the line in question is not valid C at all.  In gcc it just
produces a lot of warnings and invalid data, but not an actual error :-/

This list of numbers is actually means to be the docstring of the
function, but in this broken syntax gcc uses the first number only and
interprets that number as a char*.  So we get (char*)83 as the C-level
docstring.  You bet that accessing it via the __doc__ attribute of the
built-in function gives a nice segfault...  What is not tested is
broken :-(

I'll try to fix this.

A bientot,


More information about the Pypy-dev mailing list