Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Free Pascal
»
General
(Moderators:
FPK
,
Tomas Hajny
) »
Is this an issue? Generic method + {$M+}
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
paszlib. Determine if ext...
by
Thaddy
[
Today
at 01:35:11 pm]
How to turn OFF Word Wrap...
by
Thaddy
[
Today
at 01:03:43 pm]
CustomDraw package compil...
by
wp
[
Today
at 01:01:40 pm]
Distance of gridlines in ...
by
paweld
[
Today
at 12:50:16 pm]
How detect a keypress in ...
by
creaothceann
[
Today
at 11:55:55 am]
Code improvement, suggest...
by
ALLIGATOR
[
Today
at 11:54:58 am]
synedit
by
Martin_fr
[
Today
at 09:17:58 am]
OPCB – Object Pascal Comp...
by
kirchfritz
[
Today
at 08:34:08 am]
[CLOSED] WebView4Delphi q...
by
egsuh
[
Today
at 06:00:34 am]
Lazarus portable?
by
Mike.Cornflake
[
Today
at 04:13:55 am]
Build FCP with WinCE cros...
by
dbannon
[
Today
at 12:44:36 am]
[SOLVED] Where are my Uni...
by
tfurnivall
[
Today
at 12:05:13 am]
Anyone interested in help...
by
Roland57
[November 06, 2025, 11:49:36 pm]
32 team NFL schedule for ...
by
TBMan
[November 06, 2025, 10:29:10 pm]
Strange result of text so...
by
PascalDragon
[November 06, 2025, 08:58:36 pm]
Raising an exception with...
by
PascalDragon
[November 06, 2025, 08:29:26 pm]
Google announced the kill...
by
PascalDragon
[November 06, 2025, 08:18:52 pm]
Recreate RES file
by
Paolo
[November 06, 2025, 08:10:13 pm]
TArrayHelper
by
Thaddy
[November 06, 2025, 07:10:33 pm]
TLazSerial : serial port ...
by
mas steindorff
[November 06, 2025, 07:03:25 pm]
Text file and Timer
by
Ilya83
[November 06, 2025, 05:15:26 pm]
Searching character by ch...
by
Zvoni
[November 06, 2025, 05:07:44 pm]
CopyDirTree and empty dir...
by
Bart
[November 06, 2025, 03:44:55 pm]
Extract path from active ...
by
LemonParty
[November 06, 2025, 09:41:26 am]
Back arrow in App -> firs...
by
nicelybrewed
[November 06, 2025, 08:17:10 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Is this an issue? Generic method + {$M+} (Read 498 times)
ALLIGATOR
Sr. Member
Posts: 281
I use FPC [main] 💪🐯💪
Is this an issue? Generic method + {$M+}
«
on:
September 15, 2025, 10:19:14 am »
Code: Pascal
[Select]
[+]
[-]
program
app
;
{$ifdef FPC}{$mode delphi}{$endif}
type
{$M+}
TC
=
class
published
procedure
test<T>
;
end
;
{$M-}
procedure
TC
.
test
<T>
;
begin
WriteLn
(
'kek!'
)
;
end
;
begin
end
.
Output:
Code:
[Select]
Error: Undefined symbol: P$APP$_$TC_$__$$_TEST$1 (first seen in app.o)
D12.1CE - OK (apparently, the D12.1CE compiler is generally poor at discarding unused methods (whether this is good or bad)
Logged
I may seem rude - please don't take it personally
Leledumbo
Hero Member
Posts: 8831
Programming + Glam Metal + Tae Kwon Do = Me
Re: Is this an issue? Generic method + {$M+}
«
Reply #1 on:
September 16, 2025, 08:36:08 pm »
I'd say yes, report it. At least that shouldn't be a link time error, maybe a compile time error.
Logged
Follow this if you want me to answer:
http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F
http://pascalgeek.blogspot.com
https://bitbucket.org/leledumbo
https://github.com/leledumbo
Code first, think later - Natural programmer B)
PascalDragon
Hero Member
Posts: 6184
Compiler Developer
Re: Is this an issue? Generic method + {$M+}
«
Reply #2 on:
September 16, 2025, 10:28:13 pm »
Please report.
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Free Pascal
»
General
(Moderators:
FPK
,
Tomas Hajny
) »
Is this an issue? Generic method + {$M+}
TinyPortal
© 2005-2018