[fpc-devel] The usage of Include() doesn't work any more in 2.3.1

Graeme Geldenhuys graemeg.lists at gmail.com
Wed Jul 16 09:35:08 CEST 2008


Hi,

-------------------------  snip  --------------------------
 Include(WindowAttributes, waStayOnTop);  // <== doesn't compile with FPC 2.3.1

 WindowAttributes:=WindowAttributes +[waStayOnTop];  // <== this does
-------------------------  end  --------------------------

As far as I understood, the above two lines should do exactly the same
thing and I have been using Include() since Delphi 5 days and FPC
2.0.2.  Now in FPC 2.3.1 it doesn't work any more. I get the following
error.

--------------------------------------------------
graemeg at graemeg:splashscreen$ fpc @extrafpc.cfg test.lpr
Free Pascal Compiler version 2.3.1 [2008/06/02] for i386
Copyright (c) 1993-2008 by Florian Klaempfl
Target OS: Linux for i386
Compiling test.lpr
Compiling frm_main.pas
Compiling commands.pas
Compiling frm_splashscreen.pas
frm_splashscreen.pas(75,40) Error: Can't take the address of constant
expressions
frm_splashscreen.pas(125) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /opt/fpc_svn/bin/ppc386 returned an error exitcode (normal if
you did not specify a source file to be compiled)
--------------------------------------------------

It compiles without issues under FPC 2.2.3 and prior.  What is wrong
with using Include() to add to a set?  I do it all the time, plus
WindowAttribute is a read/write property, unlike the compiler error in
2.0.4 where you could use Include() with a read-only property.  Is
this not a regression bug in FPC 2.3.1 maybe?

WindowAttributes are defined as follows:

...
  property WindowAttributes: TWindowAttributes read FWindowAttributes
write FWindowAttributes;
...


Regards,
 - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/



More information about the fpc-devel mailing list