[Lazarus] CodeTools error when using 'section' keyword

Michael Ring mail at michael-ring.org
Wed Oct 22 09:38:05 CEST 2014


I did a little digging, Sven is right, this is only for embedded 
targets; I found the following in systems.pas:

        { all embedded systems }
        systems_embedded = [system_i386_embedded,system_m68k_embedded,
system_alpha_embedded,system_powerpc_embedded,
                            system_sparc_embedded,system_vm_embedded,
system_iA64_embedded,system_x86_64_embedded,
                            system_mips_embedded,system_arm_embedded,
system_powerpc64_embedded,system_avr_embedded,
system_jvm_java32,system_mipseb_embedded,system_mipsel_embedded];

        { all systems that allow section directive }
        systems_allow_section = systems_embedded;

I found the first occurence of this in the sources of fpc 2.4.0

Michael

Am 22.10.14 um 08:09 schrieb Sven Barth:
>
> Am 21.10.2014 23:32 schrieb "Mattias Gaertner" 
> <nc-gaertnma at netcologne.de <mailto:nc-gaertnma at netcologne.de>>:
> >
> >
> >
> > > Michael Ring <mail at michael-ring.org 
> <mailto:mail at michael-ring.org>> hat am 21. Oktober 2014 um 22:36
> > > geschrieben:
> > >
> > >
> > > program hello;
> > > const
> > >  devcfg3: longWord = DEVCFG3_DEFAULT; section '.devcfg3';
> > > begin
> > > end.
> > >
> > > is a program that compiles fine but gives me an error in lazarus 
> when I
> > > try to use completion with ctrl-SPACE.
> > >
> > >
> > > hello.pas(3,48) Error: = erwartet aber '.devcfg3' gefunden
> >
> > fpc 2.6.4 gives the same error.
> > When is "section" allowed?
>
> It only works on certain targets (currently only Embedded AFAIK). I 
> don't know its rules of declarations currently though...
>
> Regards,
> Sven
>
>
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20141022/21aa9b2a/attachment-0003.html>


More information about the Lazarus mailing list