Many thanks for the fix!

I can confirm sqlite builds on Windows now, although unfortunately it still
doesn't run correctly. My earlier statement that the issue could be "worked
around" was based purely on a successful build+call to sqlite3_libversion.
Calling sqlite3_open segfaults somewhere around sqlite3_os_init. But this
is unrelated to the function pointer parsing issue- I'll work on it and
contribute a fix if I can/prepare a test case if I can't.

- Jonathan


On Sat, 28 Jul 2018 at 18:01, Michael Matz <matz....@frakked.de> wrote:

> Hello,
>
> On Sun, 22 Jul 2018, Jonathan Newman wrote:
>
> > Hi;I happened across this issue while trying to build SQLite. I've
> attached
> > a test case. To summarise:
> > * Start off with a function pointer, correctly assigned to a function
> that
> > has attributes, but cast to a void* (or indeed anything except the
> correct
> > function pointer type)
> > * Cast this void* to the correct function pointer type, and call it
> > * Observe that one cast+call syntax works correctly, and another results
> in
> > a misparse:
> > * tcc thinks the type of the entire expression (cast+call) is a pointer,
> > instead of the correct return type of the called function (here, an
> > integer).
> > * gcc happily accepts both syntaxes
> > * This breaks compilation of the sqlite.c amalgamation, at least on
> 32-bit
> > windows
>
> Thanks for report and testcase; reproducable on linux.  The parser
> prematurely concluded that '__attribute__((foo)) *' can start a type
> (while '*' cannot).  Fixed in mob.
>
>
> Ciao,
> Michael.
>
> _______________________________________________
> Tinycc-devel mailing list
> Tinycc-devel@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel
>
_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to