gmpos
September 24, 2013, 12:23pm
1
I just tried to compile the following program:
implement main() = 1 + 1
And got this output from the compiler: http://pastie.org/8350603
The generated C source file is here: http://pastie.org/8350616
One of the lines it complains about (line 124) drew my attention:
ATSINSmove(tmpret0, PMVtmpltcstmat0 (
ATSPMVi0nt(1), ATSPMVi0nt(1))) ;
The angle brackets around S2Eextkind(…) caught my eye; that isn’t valid
C. It looks like a C++ template. What’s going on?
-Ian
gmhwxi
September 24, 2013, 1:14pm
2
ATSINSmove(tmpret0, PMVtmpltcstmat0 (
ATSPMVi0nt(1), ATSPMVi0nt(1))) ;
For now, this is actually a form of error message; it states that the
template g1int_add cannot be properly instantiated.
More informative error messages are planned later.On Tuesday, September 24, 2013 8:23:39 AM UTC-4, Admin Postiats wrote:
---------- Forwarded message ----------
From: <i....@zenhack.net <javascript:>>
Date: Mon, Sep 23, 2013 at 11:38 PM
Subject: patscc generating invalid C code?
To: ats-l...@googlegroups.com <javascript:>
I just tried to compile the following program:
implement main() = 1 + 1
And got this output from the compiler: http://pastie.org/8350603
The generated C source file is here: http://pastie.org/8350616
One of the lines it complains about (line 124) drew my attention:
ATSINSmove(tmpret0, PMVtmpltcstmat0 (
ATSPMVi0nt(1), ATSPMVi0nt(1))) ;
The angle brackets around S2Eextkind(…) caught my eye; that isn’t valid
C. It looks like a C++ template. What’s going on?
-Ian
gmhwxi
September 24, 2013, 12:31pm
3
You need to put the following line at the beginning of your code:
#include “atspre_staload.hats”
which lets the compiler to have access to various template implementations.On Tuesday, September 24, 2013 8:23:39 AM UTC-4, Admin Postiats wrote:
---------- Forwarded message ----------
From: <i....@zenhack.net <javascript:>>
Date: Mon, Sep 23, 2013 at 11:38 PM
Subject: patscc generating invalid C code?
To: ats-l...@googlegroups.com <javascript:>
I just tried to compile the following program:
implement main() = 1 + 1
And got this output from the compiler: http://pastie.org/8350603
The generated C source file is here: http://pastie.org/8350616
One of the lines it complains about (line 124) drew my attention:
ATSINSmove(tmpret0, PMVtmpltcstmat0 (
ATSPMVi0nt(1), ATSPMVi0nt(1))) ;
The angle brackets around S2Eextkind(…) caught my eye; that isn’t valid
C. It looks like a C++ template. What’s going on?
-Ian