Hello!

Cool that tcc produces usable objects on Linux again!  (I'd opened
[1] a few weeks ago, 'wasn't subscribed and am the opinion that it
is often better for the software if someone else reports bugs ;)

  [1] https://bugs.archlinux.org/task/48384

So now with [mob] i face the problem that the "const" attribute
results in "unknown struct/union/enum" error when used in the way
i do, the uncommon suffix way, i.e., TYPE ATTRIBUTE PTR/REF NAME,
as in "char const *myname", rather following Stroustrup i guess,
defining the pointer to a constant type.  So we have

     struct htmlflt_tag const *hf_ign_tag;

  In file included from accmacvar.c:40:
  nail.h:1598: error: unknown struct/union/enum
  mk.mk:105: recipe for target 'accmacvar.o' failed

It is all fine if i write

     const struct htmlflt_tag *hf_ign_tag;

or if i make the type known first as in

  struct htmlflt_tag;
  ...
     struct htmlflt_tag const *hf_ign_tag;

And then [mob] crashes with

  tcc: x86_64-gen.c:421: load: Assertion `((ft & VT_BTYPE) == VT_INT) || ((ft & 
VT_BTYPE) == VT_LLONG) || ((ft & VT_BTYPE) == VT_PTR) || ((ft & VT_BTYPE) == 
VT_ENUM) || ((ft & VT_BTYPE) == VT_FUNC)' failed.
  /bin/sh: line 3: 20505 Aborted                 (core dumped) 
/home/sdaoden/usr/opt/tcc-mob/bin/tcc -Wall -Wextra -pedantic -b -g 
-I/home/sdaoden/usr/include -I/usr/local/include -I/usr/include -c tty.c

This file is currently work in progress, but is compiled fine
(less some warnings) with gcc and clang.
Oh, and now that i'm subscribed, back in November 2015 when
i ported the mua i maintain to tcc i had to fix a miscompilation,
maybe this rings a bell.

  -   if ((ccp->cc_pass = urlp->url_pass).s != NULL)
  +   ccp->cc_pass = urlp->url_pass;
  +   if (ccp->cc_pass.s != NULL)
         goto jleave;

Hopefully tcc will see a new release soon, i really like using it
during development because of its speed!
Ciao,

--steffen

_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to