Re: array typedef problem?
- From: Bowie Owens <bowie owens csiro au>
- To: rm <async cc gatech edu>
- Cc: orbitcpp-list gnome org
- Subject: Re: array typedef problem?
- Date: Thu, 25 Sep 2003 09:01:40 +1000
Hi Robert,
You found a bug in the IDL compiler. I have fixed it in CVS. Can you
please upgrade to the latest version in CVS and confirm that it works
for you.
PS I am not sure how heavily the array code has been tested, please
continue to post any problems you have with orbitcpp. Nice small
reproducible test cases (like the one below) are most appreciated.
rm wrote:
hi,
i'm trying to declare an array with orbitcpp 1.3.7. if i
declare it at the module level, the generated files compile fine; if i
declare it at the interface level the generated header file makes gcc
unhappy.
// works ok
module Foo {
interface Bar {
};
typedef Bar BarArray[10];
interface BarPrime {
};
};
----------------------------------------
// syntax error
module Foo {
interface Bar {
};
interface BarPrime {
typedef Bar BarArray[10];
};
};
----------------------------------------------
/* test-server.cc */
#include "test.h"
#include "test-cpp.h"
#include "test-cpp-skels.h"
int
main(int argc, char ** argv)
{
CORBA::ORB_ptr orb = CORBA::ORB_init (argc, argv);
orb->run();
return 0;
}
-------------------------------------------
error from gcc 3.0.4
In file included from test-cpp.h:6,
from test-server.cc:4:
test-cpp-common.h:158: syntax error before `::' token
test-cpp-common.h:159: ISO C++ forbids declaration of `alloc' with no type
test-cpp-common.h:159: declaration of `int alloc()' not in a namespace
surrounding `::'
test-cpp-common.h:159: `int alloc()' should have been declared inside `::'
test-cpp-common.h: In function `int alloc()':
test-cpp-common.h:160: cannot convert `Foo::Bar_mgr*' to `int' in return
test-cpp-common.h: At global scope:
test-cpp-common.h:164: syntax error before `::' token
test-cpp-common.h:165: ISO C++ forbids declaration of `free' with no type
test-cpp-common.h:165: declaration of `int free(Foo::Bar_mgr*)' not in a
namespace surrounding `::'
test-cpp-common.h:165: `int free(Foo::Bar_mgr*)' should have been declared
inside `::'
test-cpp-common.h:170: syntax error before `::' token
test-cpp-common.h:171: ISO C++ forbids declaration of `copy' with no type
test-cpp-common.h:171: declaration of `int copy(Foo::Bar_mgr*, const
Foo::Bar_mgr*)' not in a namespace surrounding `::'
test-cpp-common.h:171: `int copy(Foo::Bar_mgr*, const Foo::Bar_mgr*)' should
have been declared inside `::'
make: *** [test-server.o] Error 1
------------------------------------------
is this a bug or am i doing something wrong? (all the test cases in
orbitcpp declare arrays at the module level).
thanks,
rob
----
Robert Melby
Georgia Institute of Technology, Atlanta Georgia, 30332
uucp: ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!gt4255a
Internet: async cc gatech edu
_______________________________________________
orbitcpp-list mailing list
orbitcpp-list gnome org
http://mail.gnome.org/mailman/listinfo/orbitcpp-list
--
Bowie Owens
CSIRO Mathematical & Information Sciences
phone : +61 3 9545 8055
fax : +61 3 9545 8080
mobile : 0425 729 875
email : Bowie Owens csiro au
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]