[Bug java/19738] gcjh generates invalid class member floating-point initialisers

2005-02-01 Thread rmathew at gcc dot gnu dot org
--- Additional Comments From rmathew at gcc dot gnu dot org 2005-02-01 11:19 --- A patch to avoid this error is at: http://gcc.gnu.org/ml/java-patches/2005-q1/msg00255.html Note that the correct way to initialise a const float is apparently: class Foo { static const float

[Bug java/19738] gcjh generates invalid class member floating-point initialisers

2005-02-01 Thread giovannibajo at libero dot it
--- Additional Comments From giovannibajo at libero dot it 2005-02-01 12:36 --- Yes. Notice that also this code: struct A { static const int a = 45; }; is invalid without a matching definition. That is, you need to provide a single definition of: const int A::a; which obviously

[Bug java/19738] gcjh generates invalid class member floating-point initialisers

2005-02-01 Thread rmathew at gcc dot gnu dot org
--- Additional Comments From rmathew at gcc dot gnu dot org 2005-02-01 13:01 --- (In reply to comment #2) Yes. Notice that also this code: struct A { static const int a = 45; }; is invalid without a matching definition. That is, you need to provide a single definition of:

[Bug java/19738] gcjh generates invalid class member floating-point initialisers

2005-02-01 Thread gdr at integrable-solutions dot net
--- Additional Comments From gdr at integrable-solutions dot net 2005-02-01 15:57 --- Subject: Re: gcjh generates invalid class member floating-point initialisers rmathew at gcc dot gnu dot org [EMAIL PROTECTED] writes: | A patch to avoid this error is at: | |

Re: [Bug java/19738] gcjh generates invalid class member floating-point initialisers

2005-02-01 Thread Gabriel Dos Reis
giovannibajo at libero dot it [EMAIL PROTECTED] writes: [...] | In fact, I personally use this to expose constants without linkage: | | struct A { |enum { a = 45 }; | }; agree. | but with floating point numbers you are out of luck. Indeed. -- Gaby

[Bug java/19738] gcjh generates invalid class member floating-point initialisers

2005-02-01 Thread gdr at integrable-solutions dot net
--- Additional Comments From gdr at integrable-solutions dot net 2005-02-01 16:00 --- Subject: Re: gcjh generates invalid class member floating-point initialisers giovannibajo at libero dot it [EMAIL PROTECTED] writes: [...] | In fact, I personally use this to expose constants

[Bug java/19738] gcjh generates invalid class member floating-point initialisers

2005-02-01 Thread cvs-commit at gcc dot gnu dot org
--- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-02-01 18:38 --- Subject: Bug 19738 CVSROOT:/cvs/gcc Module name:gcc Changes by: [EMAIL PROTECTED] 2005-02-01 18:38:16 Modified files: gcc/java : ChangeLog gjavah.c Log message:

[Bug java/19738] gcjh generates invalid class member floating-point initialisers

2005-02-01 Thread rmathew at gcc dot gnu dot org
--- Additional Comments From rmathew at gcc dot gnu dot org 2005-02-02 05:34 --- I checked in the patch referred to in the second comment after it was approved by Tom Tromey. -- What|Removed |Added