jiang | 21 Aug 18:52 2014

Re: tcc grammar problems

Sorry, I made ​​a mistake, there are some questions I have not clear.

Jiang

在 2014年08月22日 00:00, tinycc-devel-request <at> nongnu.org 写道:
> unsigned int xi = 0;

_______________________________________________
Tinycc-devel mailing list
Tinycc-devel <at> nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel
jiang | 21 Aug 17:55 2014

回复: tcc grammar problems

I recently some busy I may have to next week to give you write a letter. more than me some time, because I found
tcc other bug. the following statement can not compile:
unsigned int xi = 0;
Error: too many basic types.

Best regards,
jiang

Thomas Preud'homme <robotux <at> celest.fr>编写:

>Le mardi 19 août 2014, 21:28:52 Thomas Preud'homme a écrit :
>> 
>> Ok, I'll take a look at this one later this week.
>
>Sorry, I wanted to do it today but it's already too late. Maybe this WE 
>otherwise next week.
>
>Best regards,
>
>Thomas
_______________________________________________
Tinycc-devel mailing list
Tinycc-devel <at> nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Mohamed Rezgui | 21 Aug 08:04 2014
Picon

Problem to compile with visual studio 2010 project

Dear Sir,

I have an issue,
I cannot compile with visual studio 2010 project generated by CMakeList
with the last revision on git repository

=> LINK : fatal error LNK1104: cannot open file 'Debug\tcc.lib'

Can you help me please ?

--

-- 
Best Regards,
Mohamed REZGUI

YX Hao | 12 Aug 17:42 2014

Win: Advise a "spliting the crt source files" thing

Hi grischka,

As you say before:
"I'd agree with separate code, but not with separate sources."
I think there is reason.

Here as the title I have a new discovery.
Useless functions are also added when linking the executable file.

You can complie my attached file, and then take a look at the disassemble 
codes using a debugger. To the "wincrt1.c", it is the same:
"_runwinmain" for "-run" mode is linked in an exe output file, and 
"_winstart" could be in the memery of "-run" mode. It will be the same 
situation to an Unicode version.

I have made a patch and confirmed that.
As TCC does NOT do an optimization, we do for it, although the reduce of 
useless codes could not be many. :p

Attach my previous standalone version of the whole files, just for your 
convenient to confirm that.

What do you think? Hope hearing from you.

Regards,
YX 
Attachment (view_useless_code.c): application/octet-stream, 304 bytes
Attachment (wincrt1.c): application/octet-stream, 1168 bytes
Attachment (wincrt1_w.c): application/octet-stream, 1259 bytes
(Continue reading)

YX Hao | 10 Aug 11:58 2014

Win: Add Unicode support for _tmain and _tWinMain

Hi there,

I've made the patch in my local branch and the tests. Hope it's usefull.

Following are the test commands you may use.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_tmain:
----------------------------------------------------
tcc.exe test_tmain.c -D_UNICODE &&test_tmain
tcc.exe test_tmain.c &&test_tmain

tcc.exe test_tmain.c -D_UNICODE -run
tcc.exe test_tmain.c -run
----------------------------------------------------

_tWinMain:
-----------------------------------------------------------------------
-D_UNICODE for _tWinMain -*-> wWinMain

-DUNICODE for LPTSTR --> TCHAR -*-> WCHAR --> wchar_t
ASCI: LPTSTR --> TCHAR ---> CHAR  --> char

LPWSTR --> WCHAR --> wchar_t
LPSTR --> CHAR --> char
..........................................................................................................
tcc.exe test_tWinMain.c -D_UNICODE -DUNICODE -luser32 && test_tWinMain "Show 
me!"
tcc.exe test_tWinMain.c -luser32 && test_tWinMain "Show me!"

tcc.exe test_tWinMain.c -D_UNICODE -DUNICODE -luser32 -run
(Continue reading)

jiang | 9 Aug 04:52 2014

回复: tcc grammar problems

I recently some busy. may have to over a day or two to use the computer. I will give you reply.

Best regards,
jiang

Thomas Preud'homme <robotux <at> celest.fr>编写:

>Le mercredi 06 août 2014, 22:41:18 Thomas Preud'homme a écrit :
>
>[SNIP review part 2]
>
>And here is the final part (part 3)
>
> <at>  <at>  -3605,7 +3643,7  <at>  <at>  static void vpush_tokc(int t)
>
>ST_FUNC void unary(void)
>{
>-    int n, t, align, size, r, sizeof_caller;
>+    int n, t, align, size, r, sizeof_caller, save_ctrl;
>     CType type;
>     Sym *s;
>     AttributeDef ad;
> <at>  <at>  -3714,7 +3752,10  <at>  <at>  ST_FUNC void unary(void)
>                     return;
>                 }
>                 unary();
>+                save_ctrl = gen_ctrl;
>+                gen_ctrl = CTRL_FOCE;
>                 gen_cast(&type);
>+                gen_ctrl = save_ctrl;
(Continue reading)

YX Hao | 6 Aug 12:27 2014

__asm__ "unknown constraint 't'" issue

Hi there,

Here is what I found:

----------------------------------------
math.h:341: error: unknown constraint 't'
----------------------------------------

And more around this line.

I know little about asm. Can somebody take a look at it?

Regards,
Yuxi

jiang | 5 Aug 17:22 2014

回复: tcc grammar problems

HI, Thomas
My own ideas have some problems. temporarily not push into the mob.

Best regards,
Jiang

Thomas Preud'homme <robotux <at> celest.fr>编写:

>Le vendredi 01 août 2014, 16:37:15 jiang a écrit :
>> my patch:See Attachment
>> You look at, if no problem, I'll push mob
>
>Hi Jiang,
>
>I wanted to tell you that I started reviewing your patch. It'll take me time 
>as I don't have so much time to spend on it everyday but I hope I can finish in 
>a few days only.
>
>I started to make some note and already noted a few mistakes. I'll send you an 
>email later this week.
>
>Best regards,
>
>Thomas
_______________________________________________
Tinycc-devel mailing list
Tinycc-devel <at> nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel
jiang | 4 Aug 18:34 2014

Re: Tinycc-devel Digest, Vol 136, Issue 6

On Fri, Aug 1, 2014 at 5:10 PM, jiang <30155751-9uewiaClKEY@public.gmane.org> wrote:
I would like you to explain my patch.
I vstore () in bitfield values ​​on the right match, with gen_cast (dt) to achieve.
[...]

Could you please repost your explanation in english?
 
Thanks,
Sia


Le samedi 02 août 2014, 02:30:25 Sia Lang a écrit :
> On Fri, Aug 1, 2014 at 5:10 PM, jiang <30155751-9uewiaClKEY@public.gmane.org> wrote:
> > I would like you to explain my patch. > > I vstore () in bitfield values ​​on the right match, with gen_cast (dt) to > > achieve.
> > [...] > > > Could you please repost your explanation in english?
And could you be a bit more respectful? You could simply have said that you don't understand him and ask him some precision. Not everybody is a native english speaker or speak a language similar to english. Regards, Thomas
I'm sorry!


I'm sorry!
Simple English I could, I would not alright of complex sentences.


The overall mean: gen_cast () instead vstore () part of the bit field operations.
Best Regards Jiang
<div>
    <blockquote type="cite">On Fri, Aug 1, 2014 at 5:10 PM, jiang <span dir="ltr">&lt;<a href="mailto:30155751@..." target="_blank">30155751@...</a>&gt;</span>
      wrote:<br><blockquote class="gmail_quote">
        I would like you to explain my patch.<br>
        I vstore () in bitfield values &#8203;&#8203;on the right match, with
        gen_cast (dt) to achieve.</blockquote>
      <blockquote class="gmail_quote">[...]<br>
</blockquote>
      <div><br></div>
      <div>Could you please repost your explanation in english?</div>
      <div>&nbsp;</div>
      <div>Thanks,</div>
      <div>Sia</div>
    </blockquote>
    <br><br><div class="moz-cite-prefix">&#22312; 2014&#24180;08&#26376;05&#26085; 00:00,
      <a class="moz-txt-link-abbreviated" href="mailto:tinycc-devel-request@...">tinycc-devel-request@...</a> &#20889;&#36947;:<br>
</div>
    <blockquote cite="mid:mailman.50.1407168015.16009.tinycc-devel@..." type="cite">
      <div class="moz-text-plain" wrap="true" graphical-quote="true" lang="x-unicode">
        Le samedi 02 ao&ucirc;t 2014, 02:30:25 Sia Lang a &eacute;crit :

        <blockquote type="cite">
          <span class="moz-txt-citetags">&gt; </span>On Fri, Aug 1, 2014 at 5:10 PM, jiang <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:30155751@...">&lt;30155751@...&gt;</a> wrote:

          <blockquote type="cite">
            <span class="moz-txt-citetags">&gt; &gt; </span>I would like you to explain my patch.
<span class="moz-txt-citetags">&gt; &gt; </span>I vstore () in bitfield values &#8203;&#8203;on the right match, with gen_cast (dt) to
<span class="moz-txt-citetags">&gt; &gt; </span>achieve.

          </blockquote>
          <span class="moz-txt-citetags">&gt; </span>
<span class="moz-txt-citetags">&gt; </span>[...]
<span class="moz-txt-citetags">&gt; </span>
<span class="moz-txt-citetags">&gt; </span>
<span class="moz-txt-citetags">&gt; </span>Could you please repost your explanation in english?

        </blockquote>
        And could you be a bit more respectful? You could simply have said that you 
don't understand him and ask him some precision. Not everybody is a native 
english speaker or speak a language similar to english.

Regards,

Thomas
      </div>
    </blockquote>
    <span tabindex="-1" class="short_text" lang="en"><span class="hps">I'm sorry</span><span>!<br><br></span></span><br><span tabindex="-1" class="" lang="en"><span class="hps">I'm sorry</span><span class="">!</span><br><span class="hps">Simple</span> <span class="hps">English</span>
      <span class="hps">I could</span><span class="">,</span> <span class="hps">I would</span> <span class="hps alt-edited">not
        alright</span> <span class="hps">of complex</span> <span class="hps">sentences</span><span class="">.<br><br></span></span><br><span tabindex="-1" class="" lang="en"><span class="hps">The overall</span> <span class="hps">mean</span><span>:
        gen_cast ()</span> <span class="hps">instead</span> <span class="hps">vstore ()</span> <span class="hps">part of</span> <span class="hps">the bit field</span> <span class="hps">operations.</span></span><br>Best Regards

Jiang

    <br>
</div>
jiang | 4 Aug 18:14 2014

回复: tcc grammar problems

There are some problems I almost solved. But the new problems appeared, I use grischka tell me a method, with
tcc compile yasm,  No passed, is the struct already the definition of errors. I are looking for reasons
.Thank you care I patch, and can give me some suggestions.

Best regards,
Jiang

Thomas Preud'homme <robotux <at> celest.fr>编写:

>Le vendredi 01 août 2014, 16:37:15 jiang a écrit :
>> my patch:See Attachment
>> You look at, if no problem, I'll push mob
>
>Hi Jiang,
>
>I wanted to tell you that I started reviewing your patch. It'll take me time 
>as I don't have so much time to spend on it everyday but I hope I can finish in 
>a few days only.
>
>I started to make some note and already noted a few mistakes. I'll send you an 
>email later this week.
>
>Best regards,
>
>Thomas
_______________________________________________
Tinycc-devel mailing list
Tinycc-devel <at> nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel
grischka | 2 Aug 20:07 2014
Picon
Picon

Re: TinyCC

Please use the tinycc mailing list.

Gonzo FWS wrote:
> Hey,
> I'm not much of an expert on the C-standard, however I have been using 
> libtcc in a C++11 project of mine.
> I cannot immediately use these functions:
> tcc_get_symbol
> tcc_add_symbol
> 
> Because C++ is very strict: It will not convert void* to any function 
> pointer and even vice versa.

How not?

     void (*pfoo)() = (void(*)()) tcc_get_symbol(s, "foo");

> Is tcc_get_symbol and tcc_add_symbol used for non-functions, eg. int? Or 
> strictly for functions?
> 
> If they are only ever used for functions, this solution may work for 
> everyone:
> typedef void (*tcc_func_ptr)();
> LIBTCCAPI int tcc_add_symbol(TCCState *s, const char *name, const 
> tcc_func_ptr val);
> LIBTCCAPI tcc_func_ptr tcc_get_symbol(TCCState *s, const char *name);

As I see it that is not better for C++, but worse for C.

> It works because C++ allows conversion between all types of function 
> pointers.
> In any case, it is a matter of pedantry as far as strictly C goes.
> I have to continue to use my variation for it to compile, and it's 
> working well.
> 
> 
> 
> A super-minor nitpick I have is that I cannot recompile code using the 
> same code-generation state. (tcc_state_new)
> If it's only less efficient in my case because my libpaths and incpaths 
> never change, as well as the linker symbols I add. I have no specific 
> wishes regarding this, but if you have any plans to make it possible to 
> clear out all the code (reset) and compile again with all or some of the 
> settings intact, that would be super.

Sure, everybody has extra wishes, and except for that then wants
an interface as simple as possible in order not to have too much
to read. ;)

> Thanks for all the great work being done, as it's a very interesting 
> project.

Thanks,

-- gr

> -gonzo
> 


Gmane