Sign in Join

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

Mailing lists / fpc-pascal / 2026-10

Unexpected warning messages...

8 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

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

Gene Buckle

I've started working with FPC again after a VERY long hiatus (like 15+ years!) and the application I'm working on uses TObjectCollection from the Generics.Collection unit.

When compiling I get the following warnings from generics.dictionaries and I was wondering why that is happening - I'd have thought that "base" units would always compile cleanly. I know I can filter them out in Lazarus, but I would rather not if it can be avoided on the assumption that warnings are warnings for a *reason*. :)

Thanks!

g.

generics.dictionaries.inc(191,92) Warning: Constructing a class
"TCustomDictionaryEnumerator$4$crcA343985C" with abstract method
"DoMoveNext"
generics.collections.pas(121,14) Hint: Found abstract method:
DoMoveNext(<TEnumerator$1$crc009C9A55>):Boolean;
generics.dictionaries.inc(191,92) Warning: Constructing a class
"TCustomDictionaryEnumerator$4$crcA343985C" with abstract method
"GetCurrent"
generics.dictionariesh.inc(119,14) Hint: Found abstract method:
GetCurrent(<TCustomDictionaryEnumerator$4$crcA343985C>):TObject;
generics.dictionaries.inc(191,92) Warning: Constructing a class
"TCustomDictionaryEnumerator$4$crcD6053DC4" with abstract method
"DoMoveNext"
generics.collections.pas(121,14) Hint: Found abstract method:
DoMoveNext(<TEnumerator$1$crc6824777A>):Boolean;
generics.dictionaries.inc(191,92) Warning: Constructing a class
"TCustomDictionaryEnumerator$4$crcD6053DC4" with abstract method
"GetCurrent"
generics.dictionariesh.inc(119,14) Hint: Found abstract method:
GetCurrent(<TCustomDictionaryEnumerator$4$crcD6053DC4>;<var
AnsiString>):AnsiString;
generics.collections.pas(144,52) Note: Private type
"TCustomPointersEnumerator$2<SYSTEM.AnsiString,BBS_SESSION.TCustomList$1$crc6824777A.PT>.T"
never used
generics.collections.pas(144,52) Note: Private type
"TCustomPointersEnumerator$2<SYSTEM.TObject,BBS_SESSION.TCustomList$1$crc009C9A55.PT>.T"
never used
generics.collections.pas(144,52) Note: Private type
"TCustomPointersEnumerator$2<BBS_SESSION.TPair$2<SYSTEM.AnsiString,SYSTEM.TObject>,BBS_SESSION.TCustomList$1$crcBDF2BF71.PT>.T"
never used
generics.dictionaries.inc(191,92) Warning: Constructing a class
"TCustomDictionaryEnumerator$4$crcA343985C" with abstract method
"DoMoveNext"
generics.collections.pas(121,14) Hint: Found abstract method:
DoMoveNext(<TEnumerator$1$crc009C9A55>):Boolean;
generics.dictionaries.inc(191,92) Warning: Constructing a class
"TCustomDictionaryEnumerator$4$crcA343985C" with abstract method
"GetCurrent"
generics.dictionariesh.inc(119,14) Hint: Found abstract method:
GetCurrent(<TCustomDictionaryEnumerator$4$crcA343985C>):TObject;
generics.dictionaries.inc(191,92) Warning: Constructing a class
"TCustomDictionaryEnumerator$4$crcD6053DC4" with abstract method
"DoMoveNext"
generics.collections.pas(121,14) Hint: Found abstract method:
DoMoveNext(<TEnumerator$1$crc6824777A>):Boolean;
generics.dictionaries.inc(191,92) Warning: Constructing a class
"TCustomDictionaryEnumerator$4$crcD6053DC4" with abstract method
"GetCurrent"
generics.dictionariesh.inc(119,14) Hint: Found abstract method:
GetCurrent(<TCustomDictionaryEnumerator$4$crcD6053DC4>;<var
AnsiString>):AnsiString;
generics.collections.pas(144,52) Note: Private type
"TCustomPointersEnumerator$2<SYSTEM.AnsiString,TELNETHOST.TCustomList$1$crc6824777A.PT>.T"
never used
generics.collections.pas(144,52) Note: Private type
"TCustomPointersEnumerator$2<SYSTEM.TObject,TELNETHOST.TCustomList$1$crc009C9A55.PT>.T"
never used
generics.collections.pas(144,52) Note: Private type
"TCustomPointersEnumerator$2<TELNETHOST.TPair$2<SYSTEM.AnsiString,SYSTEM.TObject>,TELNETHOST.TCustomList$1$crc68ACD26F.PT>.T"
never used
generics.dictionaries.inc(191,92) Warning: Constructing a class
"TCustomDictionaryEnumerator$4$crcA343985C" with abstract method
"DoMoveNext"
generics.collections.pas(121,14) Hint: Found abstract method:
DoMoveNext(<TEnumerator$1$crc009C9A55>):Boolean;
generics.dictionaries.inc(191,92) Warning: Constructing a class
"TCustomDictionaryEnumerator$4$crcA343985C" with abstract method
"GetCurrent"
generics.dictionariesh.inc(119,14) Hint: Found abstract method:
GetCurrent(<TCustomDictionaryEnumerator$4$crcA343985C>):TObject;
generics.dictionaries.inc(191,92) Warning: Constructing a class
"TCustomDictionaryEnumerator$4$crcD6053DC4" with abstract method
"DoMoveNext"
generics.collections.pas(121,14) Hint: Found abstract method:
DoMoveNext(<TEnumerator$1$crc6824777A>):Boolean;
generics.dictionaries.inc(191,92) Warning: Constructing a class
"TCustomDictionaryEnumerator$4$crcD6053DC4" with abstract method
"GetCurrent"
generics.dictionariesh.inc(119,14) Hint: Found abstract method:
GetCurrent(<TCustomDictionaryEnumerator$4$crcD6053DC4>;<var
AnsiString>):AnsiString;
generics.collections.pas(144,52) Note: Private type
"TCustomPointersEnumerator$2<SYSTEM.AnsiString,SSHHOST.TCustomList$1$crc6824777A.PT>.T"
never used
generics.collections.pas(144,52) Note: Private type
"TCustomPointersEnumerator$2<SYSTEM.TObject,SSHHOST.TCustomList$1$crc009C9A55.PT>.T"
never used
generics.collections.pas(144,52) Note: Private type
"TCustomPointersEnumerator$2<SSHHOST.TPair$2<SYSTEM.AnsiString,SYSTEM.TObject>,SSHHOST.TCustomList$1$crc7C7C60B1.PT>.T"
never used
generics.dictionaries.inc(191,92) Warning: Constructing a class
"TCustomDictionaryEnumerator$4$crcA343985C" with abstract method
"DoMoveNext"
generics.collections.pas(121,14) Hint: Found abstract method:
DoMoveNext(<TEnumerator$1$crc009C9A55>):Boolean;
generics.dictionaries.inc(191,92) Warning: Constructing a class
"TCustomDictionaryEnumerator$4$crcA343985C" with abstract method
"GetCurrent"
generics.dictionariesh.inc(119,14) Hint: Found abstract method:
GetCurrent(<TCustomDictionaryEnumerator$4$crcA343985C>):TObject;
generics.dictionaries.inc(191,92) Warning: Constructing a class
"TCustomDictionaryEnumerator$4$crcD6053DC4" with abstract method
"DoMoveNext"
generics.collections.pas(121,14) Hint: Found abstract method:
DoMoveNext(<TEnumerator$1$crc6824777A>):Boolean;
generics.dictionaries.inc(191,92) Warning: Constructing a class
"TCustomDictionaryEnumerator$4$crcD6053DC4" with abstract method
"GetCurrent"
generics.dictionariesh.inc(119,14) Hint: Found abstract method:
GetCurrent(<TCustomDictionaryEnumerator$4$crcD6053DC4>;<var
AnsiString>):AnsiString;
generics.collections.pas(144,52) Note: Private type
"TCustomPointersEnumerator$2<SYSTEM.AnsiString,BBS_MAIN.TCustomList$1$crc6824777A.PT>.T"
never used
generics.collections.pas(144,52) Note: Private type
"TCustomPointersEnumerator$2<SYSTEM.TObject,BBS_MAIN.TCustomList$1$crc009C9A55.PT>.T"
never used
generics.collections.pas(144,52) Note: Private type
"TCustomPointersEnumerator$2<BBS_MAIN.TPair$2<SYSTEM.AnsiString,SYSTEM.TObject>,BBS_MAIN.TCustomList$1$crcE0B4E8C7.PT>.T"
never used
Proud owner of F-15C 80-0007 http://www.f15sim.com - The only one of its kind. http://www.diy-cockpits.org/coll - Go Collimated or Go Home. I'm not crazy, I'm plausibly off-nominal! ScarletDME - The red hot Data Management Environment A Multi-Value database for the masses, not the classes. https://github.com/geneb/ScarletDME - Get it _today_!
Sven Barth
to Gene Buckle

Gene Buckle via fpc-pascal schrieb am
Fr., 16. Okt. 2026, 16:42:

Show quoted text 10 lines
I've started working with FPC again after a VERY long hiatus (like 15+ years!) and the application I'm working on uses TObjectCollection from the Generics.Collection unit. When compiling I get the following warnings from generics.dictionaries and I was wondering why that is happening - I'd have thought that "base" units would always compile cleanly. I know I can filter them out in Lazarus, but I would rather not if it can be avoided on the assumption that warnings are warnings for a *reason*. :)

The assumption that base units compile cleanly is not true. Normally you don't notice it however cause they're pre-compiled. Exceptions are inlined routines and generic specializations cause they're both processed inside the unit they're used in.

There isn't really something you can do and in this case they aren't problematic either. In the development version these messages have been reduced.

Regards,
Sven

Gene Buckle
to Sven Barth
Sven Barth wrote 24 lines
Gene Buckle via fpc-pascal schrieb am Fr., 16. Okt. 2026, 16:42: I've started working with FPC again after a VERY long hiatus (like 15+ years!) and the application I'm working on uses TObjectCollection from the Generics.Collection unit. When compiling I get the following warnings from generics.dictionaries and I was wondering why that is happening - I'd have thought that "base" units would always compile cleanly. I know I can filter them out in Lazarus, but I would rather not if it can be avoided on the assumption that warnings are warnings for a *reason*. :) The assumption that base units compile cleanly is not true. Normally you don't notice it however cause they're pre-compiled. Exceptions are inlined routines and generic specializations cause they're both processed inside the unit they're used in.

I don't understand why they're being compiled all the time - is this a Lazarus thing?  AFAIK, the only time an RTL unit should *ever* be recompiled is if the source changes.

The filters  (Lazarus 4.8) don't work well as filtering for "...never used" in generics.collections.pas never works; they're always displayed.

There isn't really something you can do and in this case they aren't problematic either. In the development version these messages have been reduced.

They're problematic for *me* by spamming the Messages window with junk I don't need to see which makes the things I NEED to see difficult to find.

g.

Proud owner of F-15C 80-0007 http://www.f15sim.com - The only one of its kind. http://www.diy-cockpits.org/coll - Go Collimated or Go Home. I'm not crazy, I'm plausibly off-nominal! ScarletDME - The red hot Data Management Environment A Multi-Value database for the masses, not the classes. https://github.com/geneb/ScarletDME - Get it _today_!
Thomas Kurz
to Gene Buckle

I think they have to be compiled because of the usage of generic types. The compiler cannot know in advance what specialization you're gonna use.

Earlier message 50 lines
----- Original Message ----- From: Gene Buckle via fpc-pascal To: Sent: Saturday, October 17, 2026, 19:16:02 Subject: [fpc-pascal] Unexpected warning messages... On 10/17/2026 12:52 AM, Sven Barth via fpc-pascal wrote: > Gene Buckle via fpc-pascal schrieb > am Fr., 16. Okt. 2026, 16:42: > > I've started working with FPC again after a VERY long hiatus (like > 15+ > years!) and the application I'm working on uses TObjectCollection > from > the Generics.Collection unit. > > When compiling I get the following warnings from > generics.dictionaries > and I was wondering why that is happening - I'd have thought that > "base" > units would always compile cleanly. I know I can filter them out in > Lazarus, but I would rather not if it can be avoided on the > assumption > that warnings are warnings for a *reason*. :) > > > The assumption that base units compile cleanly is not true. Normally > you don't notice it however cause they're pre-compiled. Exceptions are > inlined routines and generic specializations cause they're both > processed inside the unit they're used in. > I don't understand why they're being compiled all the time - is this a Lazarus thing?  AFAIK, the only time an RTL unit should *ever* be recompiled is if the source changes. The filters  (Lazarus 4.8) don't work well as filtering for "...never used" in generics.collections.pas never works; they're always displayed. > There isn't really something you can do and in this case they aren't > problematic either. In the development version these messages have > been reduced. > They're problematic for *me* by spamming the Messages window with junk I don't need to see which makes the things I NEED to see difficult to find. g. -- Proud owner of F-15C 80-0007 http://www.f15sim.com - The only one of its kind. http://www.diy-cockpits.org/coll - Go Collimated or Go Home. I'm not crazy, I'm plausibly off-nominal! ScarletDME - The red hot Data Management Environment A Multi-Value database for the masses, not the classes. https://github.com/geneb/ScarletDME - Get it _today_!
Mattias Gaertner
to Gene Buckle: I don't understand why they're being compiled all the time - is this a Lazarus thing? …
Gene Buckle wrote
[...] I don't understand why they're being compiled all the time - is this a Lazarus thing?  AFAIK, the only time an RTL unit should *ever* be recompiled is if the source changes.

The rtl unit is not recompiled. The generic code is compiled to a specialize.

Of course it would be nice if the specialization can be compiled without hints and warnings.

The filters  (Lazarus 4.8) don't work well as filtering for "...never used" in generics.collections.pas never works; they're always displayed.

Hmm, I wonder what would be a good filter to hide such hints/warnings.

Show quoted text 6 lines
> There isn't really something you can do and in this case they aren't > problematic either. In the development version these messages have > been reduced. > They're problematic for *me* by spamming the Messages window with junk I don't need to see which makes the things I NEED to see difficult to find.

+1

Mattias

Martin Frb
to Mattias Gaertner
Mattias Gaertner wrote
Of course it would be nice if the specialization can be compiled without hints and warnings.

Unless they depend on the gen param

E.g. dead code could be due to
   if sizeof(G_PARAM) = 1 then

of course then such dead code may be "by design"

Show quoted text 5 lines
> The filters  (Lazarus 4.8) don't work well as filtering for "...never > used" in generics.collections.pas never works; they're always displayed. Hmm, I wonder what would be a good filter to hide such hints/warnings.

Depends.

In many cases the generic is from a unit outside the current package => the IDE could see that and know that unit wasn't just compiled. (assuming it can detect all trickeries with PATH settings in all places, and "uses" with a "in file" ....

If the generic is from the same package => well then it got compiled anyway

Gene Buckle
to Thomas Kurz: I think they have to be compiled because of the usage of generic types. The compiler…
Thomas Kurz wrote
I think they have to be compiled because of the usage of generic types. The compiler cannot know in advance what specialization you're gonna use.

Ah, that would make sense.  I'm glad you mentioned that - I was going to wipe the sources to stop the constant warning spam...

tnx!

g.

Proud owner of F-15C 80-0007 http://www.f15sim.com - The only one of its kind. http://www.diy-cockpits.org/coll - Go Collimated or Go Home. I'm not crazy, I'm plausibly off-nominal! ScarletDME - The red hot Data Management Environment A Multi-Value database for the masses, not the classes. https://github.com/geneb/ScarletDME - Get it _today_!
Gene Buckle
to Mattias Gaertner: The rtl unit is not recompiled. The generic code is compiled to a specialize. Of course…
The rtl unit is not recompiled. The generic code is compiled to a specialize.

Found out about that today. :)

Of course it would be nice if the specialization can be compiled without hints and warnings.

Wouldn't it? :)

Show quoted text 5 lines
> The filters  (Lazarus 4.8) don't work well as filtering for "...never > used" in generics.collections.pas never works; they're always displayed. Hmm, I wonder what would be a good filter to hide such hints/warnings.

Right clicking on the message and adding it to the filter doesn't do anything, unfortunately.

g.

Proud owner of F-15C 80-0007 http://www.f15sim.com - The only one of its kind. http://www.diy-cockpits.org/coll - Go Collimated or Go Home. I'm not crazy, I'm plausibly off-nominal! ScarletDME - The red hot Data Management Environment A Multi-Value database for the masses, not the classes. https://github.com/geneb/ScarletDME - Get it _today_!