tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Tinycc-devel] bug report (cannot cast 'const struct foo' to 'struct foo


From: Brian Gough
Subject: [Tinycc-devel] bug report (cannot cast 'const struct foo' to 'struct foo')
Date: Fri, 25 Jul 2003 13:52:56 +0100

Hi,
I encountered a problem compiling some code with tcc-0.9.19.
Below is a test case which reproduces it.

I've checked that the previous version of tcc-0.9.18 compiled the same
code without errors.

I hope this is useful info.

best regards
-- 
Brian Gough

p.s. Thanks for making tcc free software -- it's great!

Network Theory Ltd            
15 Royal Park                 
Bristol BS8 3AL               
United Kingdom                

Tel: +44 (0)117 3179309 
Fax: +44 (0)117 9048108              
Web: http://www.network-theory.co.uk/

----------------------------------------------------------------------

$ tcc -c testtcc.c
testtcc.c:8: cannot cast 'const struct foo' to 'struct foo'
$ tcc -v
tcc version 0.9.19
$ gcc -Wall -ansi testtcc.c
$

====> testtcc.c <====
struct foo {
  double a[2];
};

void 
init (struct foo * data) {
  const struct foo base = {{1.0, 0.0}};
  *data = base;
  return;
}

int
main (void)
{
  struct foo x;
  init(&x);
  return 0;
}




reply via email to

[Prev in Thread] Current Thread [Next in Thread]