Re: [Tinycc-devel] the most useless question on this list about basic c++ extensions

2010-05-10 Thread pancake

On 05/09/10 23:08, Thomas Preud'homme wrote:

On Saturday 08 May 2010 17:05:32 mobi phil wrote:
   

Hello,

the most useless question on this list:
did anybody think about adding basic C++ extensions to tcc, eventually
trivial form of templates?
 

tcc misses at least one thing for C++: exception handling. I plan to implement
it but I won't start the implementation before mid june so don't be too in a
hurry. :) And of course the C++ parsing must be added. As some some rules are
different than in C (like priority of operators), this might require some
(maybe minor) refactoring. Also, the calling convention is different so there
is work to do in the symbols generation as well. That's for what I know, I may
have forgotten things.

Regards.
   


C++ is a very different weird and hardly complex language compared to C.

Are you saying that TCC will support it? In mainstream? As an extension?

I would really prefer to not have such support..and in case, just think on
object-oriented extensions, but not c++.

--pancake


___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] Debugger for TCC

2010-04-18 Thread pancake
You can also use radare or radare2. But source level is not very well  
supported, just addr2line.


On Apr 18, 2010, at 10:28 AM, grischka gris...@gmx.de wrote:


Alexei wrote:
Which debuggers work with TCC executables? I mean source level  
debugging.

Thanks


GDB (or any debugger that understands stabs) should work.

However we have just global symbols (functions and variables) and line
number info.  No stack variables and no type info.  So, basic but  
better

than nothing.

--- grischka


___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/tinycc-devel




___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] Array BUG

2010-03-15 Thread pancake
this code doesnt compiles with gcc ,the bug is because tcc allows to 
compile such expressions?


can you explain it better?

a.c: In function ‘main’:
a.c:8: warning: format ‘%X’ expects type ‘unsigned int’, but argument 2 
has type ‘int *’
a.c:8: warning: format ‘%X’ expects type ‘unsigned int’, but argument 3 
has type ‘int *’

a.c:10: error: invalid use of array with unspecified bounds
a.c:10: error: invalid use of array with unspecified bounds
a.c:10: warning: format ‘%X’ expects type ‘unsigned int’, but argument 2 
has type ‘pList’
a.c:10: warning: format ‘%X’ expects type ‘unsigned int’, but argument 3 
has type ‘pList’


Alexei wrote:

#include stdio.h
int arr[2];
typedef intList[];
typedef List*  pList; 
pList pa;

int main(int argc, char **argv)
{
  printf([0]=%X [1]=%X\n,arr[0],arr[1]);
  pa = arr;
  printf([0]=%X [1]=%X\n,pa[0],pa[1]);
}
Runtime:
[0]=4020D0 [1]=4020D4
[0]=4020D0 [1]=4020CC



___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/tinycc-devel

  




___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] Anyone interested in a fork with custom object-oriented extensions?

2010-03-12 Thread pancake

Check http://live.gnome.org/Vala too

i think it works fine with tinicc

Míguel wrote:

Hi, Jerome!

Very interesting! I've been taking a look at the documentation and it
seems to be similar to what I had in mind.
I will take a deeper look at it.

Thanks for the information!
--
Miguel Angel Fraile.


___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/tinycc-devel

  




___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/tinycc-devel


[Tinycc-devel] cannot infer opcode suffix

2010-02-05 Thread pancake
I've been trying to build some .S files I generate with rcc[1]
using tcc and I got some errors. Looks like opcodes like:

push 20(%ebp)  ; are not supported

It doesnt supports labels starting with '.':

.LC0_0_end_frame0:
  ...

In GCC the labels starting with .LC# are hidden. (not exported as a symbol)

Another problem I have notified is that when compiling .S files
the error line number is +1 of the correct one. Here's an example:

  1  push %eax
  2  push -20(%ebp)  ; error is here
  3  mov $43, %ecx

tcc reports:
  a.S:3: cannot infer opcode suffix

It would be great if somebody can take a look on these bugs.

Thanks

[1] http://hg.youterm.com/rcc

--pancake


___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/tinycc-devel


[Tinycc-devel] patch for configure

2010-02-05 Thread pancake
I have spotted some issues in the configure script.

- Some undocumented configure flags
   --cpu = { .. }
   not all handled architectures by the configure script are
   supported by the compiler
   - needs to cleanup
   --enable-cross
   fails to build the mingw32 compiler in linux32 bits
   - does it builds arm crosscompiler?
   - does it builds a different .a for each cpu? or only the tcc binary?
   --enable-mingw32
   --enable-gprof
   undocumented
   --extra-cflags, ldflags, libs
   those options can be taken from the environment, no need to
   have multiple ways to do the same

In the patch I have removed the --extra-* flags and documented in --help
the supported configure options.

The list of supported CPUs should be reviewed. Do we really support IL, MIPS, 
ALPHA?

--pancakediff --git a/configure b/configure
index 770ea70..4ddb901 100755
--- a/configure
+++ b/configure
@@ -114,12 +114,6 @@ for opt do
   ;;
   --cc=*) cc=`echo $opt | cut -d '=' -f 2`
   ;;
-  --extra-cflags=*) CFLAGS=${opt#--extra-cflags=}
-  ;;
-  --extra-ldflags=*) LDFLAGS=${opt#--extra-ldflags=}
-  ;;
-  --extra-libs=*) extralibs=${opt#--extra-libs=}
-  ;;
   --cpu=*) cpu=`echo $opt | cut -d '=' -f 2`
   ;;
   --enable-gprof) gprof=yes
@@ -228,6 +222,10 @@ echo   --source-path=PATH   path of source code [$source_path]
 echo   --cross-prefix=PREFIXuse PREFIX for compile tools [$cross_prefix]
 echo   --sysroot=PREFIX prepend PREFIX to library/include paths []
 echo   --cc=CC  use C compiler CC [$cc]
+echo   --cpu=CPUcrosscompile to (x86 x86-64 c67 il armv4l powerpc mips s390 alpha) [$cpu]
+echo   --enable-cross   build crosscompiler for all supported platforms
+echo   --enable-mingw32 build crosscompiler for mingw32 (PREFIX=i386-mingw32)
+echo   --enable-gprof   use gprof
 echo   --with-libgccuse /lib/libgcc_s.so.1 instead of libtcc1.a
 echo 
 #echo NOTE: The object files are build at the place where configure is launched
___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] The tcc-0.9.25 compile c to pe_file, report virus by some antivirus!

2009-10-28 Thread pancake
It's dangerous to push bins in virustotal that you know that are not  
virus because their heuristics makes they think that your bin that has  
been uploaded 100 doesn't looks like a virus but it can probably be  
one of them.


When this happens, the antivirus companies get those signatures and a  
week later your binary that was not a virus is now detected as a virus.


Please, don't make all tcc bins look like a virus :)

On Oct 28, 2009, at 2:45 AM, Fei Liang bsch1...@gmail.com wrote:


The tcc-0.9.25 compile c to pe_file, report virus by some antivirus!
espcial compile the GUI mode!
eg. the example/hello_win.c and other GUI c code.
to test it, you could send it to http://www.virustotal.com/, it has  
much antivirus engine to scan your send file.

___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/tinycc-devel
___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] Re: Antivirus headaches

2009-06-12 Thread pancake
You can try uploading the bins to www.virustotal.com to get a report  
from mostly all current AV.


Are those bins uploaded somewhere? I know ppl from some av companies  
and they can review it. Signature based detection is a deprecated  
technique..but it's still used :(


On Jun 12, 2009, at 8:22 AM, vijay mohan coder...@gmail.com wrote:


Hi,
   I sent one of the 'infected' exes to AVG and received a curt  
reply that it was infected ;-(. After  several attempts to find a  
common pattern among all random warnings, i gave up the direct  
approach and found a roundabout solution:

1. create the output exe with extension .txt
2. compress with upx
3. rename the file with extension .exe
Now avg is happy and so am i.Hope this works for RÃdiger too.
vijay
___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/tinycc-devel



___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] release 0.9.25 candidate

2009-05-11 Thread pancake
Would be good to send the changelog together with the release announce  
email.


Congratulations for the release :)

On May 11, 2009, at 7:18 PM, grischka gris...@gmx.de wrote:


I have put together a release candidate for 0.9.25:

   http://repo.or.cz/w/tinycc.git

which I plan to upload at savannah in a week or so.  Say unless
there is something important still missing.

--- grischka



___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/tinycc-devel




___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/tinycc-devel


[Tinycc-devel] TCC in GSoC2k9

2009-03-10 Thread pancake

I have proposed TCC as a project to be developed this summer
into the google summer of code of this year under the umbrella
of the suckless project.

 http://www.suckless.org/GSoC2009

People interested contact me or g...@suckless.org

Here's the text:




 Improve tcc

We'd like to see tcc http://bellard.org/tcc/ being continued and 
improved. gcc is too slow and too focused on language-agnostics and 
particularly focused on its C++ support. We got the impression that most 
open source software is written in C and makes no use of C++, so that 
it's desirable to have an improved tcc.


We are also concerned about recent attempts to implement the C front-end 
of gcc in C++. We believe that is a bad decision in general (due to 
demanding C++ as bootstrapping environment) and would like to get rid 
from the gcc dependency for these reasons.


We'd like to see that the improved tcc is able to build all suckless 
projects and perhaps the modern libc replacement.




___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/tinycc-devel