Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2012-09

Is this a compiler bug ?

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

ik

Hello,

While trying to compile FPC r22471:
make CROSSOPT="-O2 -g -FD/usr/share/java/" CPU_TARGET=jvm OS_TARGET=android INSTALL_PREFIX=/usr/ FPC=/usr/bin/ppcx64 all zipinstall

I get the following message:

/home/ik/projects/foss/fpc/fpc/compiler/ppc -Ur -Xs -O2 -n -Fujvm -Fusystems -Fu/home/ik/projects/foss/fpc/fpc/rtl/units/x86_64-linux -Fijvm -FE. -FUjvm/units/x86_64-linux -Cg -dRELEASE -djvm -dGDB -dBROWSERLOG -Fujvm -dNOOPT -Sew pp.pas
hlcgcpu.pas(2392,28) Warning: Constructing a class "thlcgjvm" with abstract method "g_overflowcheck"
hlcgcpu.pas(2392,28) Warning: Constructing a class "thlcgjvm" with abstract method "g_overflowCheck_loc"
hlcgcpu.pas(2397) Fatal: There were 2 errors compiling module, stopping

The Compiler display two warnings and then it report them as 2 errors.

I'm using Free Pascal Compiler version 2.6.0 [2012/05/17] for x86_64 that arrives with Arch-Linux

Is this a bug of the compiler (reporting errors as warnings), a bug in the code itself, or something else ?

Ido

Reply by email

Jonas Maebe
to ik
ik wrote 7 lines
The Compiler display two warnings and then it report them as 2 errors. I'm using Free Pascal Compiler version 2.6.0 [2012/05/17] for x86_64 that arrives with Arch-Linux Is this a bug of the compiler (reporting errors as warnings), a bug in the code itself, or something else ?

The compiler makefile passes the -Sew option to the compiler, which instructs it to treat all warnings as errors. As documented at http://wiki.freepascal.org/FPC_JVM/Building#Building_the_compiler_and_RTL , you currently have to pass ALLOW_WARNINGS=1 to make in order to build the jvm compiler.

Jonas

Reply by email

Pierre Free Pascal
to ik: While trying to compile FPC r22471: make CROSSOPT="-O2 -g -FD/usr/share/java/" …
Show quoted text 35 lines
-----Message d'origine----- De : [mailto:fpc-devel- De la part de ik Envoyé : jeudi 27 septembre 2012 15:05 À : FPC developers' list Objet : [fpc-devel] Is this a compiler bug ? Hello, While trying to compile FPC r22471: make CROSSOPT="-O2 -g -FD/usr/share/java/" CPU_TARGET=jvm OS_TARGET=android INSTALL_PREFIX=/usr/ FPC=/usr/bin/ppcx64 all zipinstall I get the following message: /home/ik/projects/foss/fpc/fpc/compiler/ppc -Ur -Xs -O2 -n -Fujvm -Fusystems -Fu/home/ik/projects/foss/fpc/fpc/rtl/units/x86_64-linux -Fijvm -FE. -FUjvm/units/x86_64-linux -Cg -dRELEASE -djvm -dGDB -dBROWSERLOG -Fujvm -dNOOPT -Sew pp.pas hlcgcpu.pas(2392,28) Warning: Constructing a class "thlcgjvm" with abstract method "g_overflowcheck" hlcgcpu.pas(2392,28) Warning: Constructing a class "thlcgjvm" with abstract method "g_overflowCheck_loc" hlcgcpu.pas(2397) Fatal: There were 2 errors compiling module, stopping The Compiler display two warnings and then it report them as 2 errors. I'm using Free Pascal Compiler version 2.6.0 [2012/05/17] for x86_64 that arrives with Arch-Linux Is this a bug of the compiler (reporting errors as warnings), a bug in the code itself, or something else ?

It is a feature of both the compiler capabilities itself and of the fact that we consider that correct code should not generate warnings.
-Sew is the option that transforms any warning into an error it is a feature of the compiler that is used by default when cycling (In the sense do a 'make cycle') the compiler. For java target it is known that there are warnings left, but you can still use the Makefiles by adding
ALLOW_WARNINGS=1 to the 'make cycle' command line.

Pierre Muller
... who's responsible for adding -Sew to the default compiler cycling!

Reply by email