Variable declaration detected as syntax error for UDTs
|
|
Bugzilla Link |
584 |
Created on |
Nov 05, 2009 17:52 |
Resolution |
FIXED |
Resolved on |
Oct 23, 2013 22:58 |
Version |
1.00beta |
OS |
All |
Architecture |
PC |
Extended Description
sac2c rev. 16582
The following code produces a syntax error:
---
module cpx;
import Structures : all;
complex[.] f()
{
complex[2] C;
C = genarray( [2], toc( 0d, 0d));
return( C);
}
---
---
** 1: Loading SAC program ...
**** Locating source code ...
Reading from file "./cpx.sac" ...
**** Running C preprocessor ...
**** Parsing input file ...
ABORT: line 7 file: cpx.sac
ABORT: syntax error at pos 14: 'C`
ABORT: complex[2] C;
ABORT: ^
*** Compilation failed ***
---
If the type of "C" is changed to "double" (or some other built-in type) the compiler does not report a syntax error.