View Issue Details

IDProjectCategoryView StatusLast Update
0031516FPCRTLpublic2017-03-14 18:48
ReportersilvioprogAssigned ToMichael Van Canneyt 
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version3.1.1Product Build 
Target Version3.2.0Fixed in Version3.1.1 
Summary0031516: [FEATURE REQUEST] Types FixedInt and FixedUInt
DescriptionHi,

It would be nice to add the types FixedInt and FixedUInt to the system unit. This types are very useful when we need to C types 'int' and 'unsigned int':

http://docwiki.embarcadero.com/RADStudio/Berlin/en/Delphi_to_C%2B%2B_types_mapping

The unit 'ctypes' already declares 'cint' and 'cuint', so unit system just need an alias for them.

Thank you!
TagsNo tags attached.
Fixed in Revision35560
FPCOldBugId
FPCTarget
Attached Files

Activities

Thaddy de Koning

2017-03-10 07:54

reporter   ~0098786

Since they are related to ctypes, why not define them in ctypes?
Does system already have a dependency on ctypes?

silvioprog

2017-03-10 15:22

reporter   ~0098806

Last edited: 2017-03-10 15:23

View 2 revisions

> Since they are related to ctypes, why not define them in ctypes?

FixedInt/FixedUInt were new types introduced in Delphi's system unit, so to retro-compatibility FPC should introduce them too, avoiding the programmer have to guess which unit declares them.

> Does system already have a dependency on ctypes?

I'm not sure if the FPC's system has some dependence on ctypes, anyway it can be used just to check how it has resolved these types. :-)

Marco van de Voort

2017-03-10 23:47

manager   ~0098807

Last edited: 2017-03-10 23:50

View 3 revisions

Well, Delphi docs define them as C++ not C?

Anyway, if they are added they should go in unit system, objpas or types, depending on their visibility on Delphi.

Ctypes is for interfacing FPC with its associated C compiler (usually GCC) which might not be Embacadero's associated C++ (not C!) compiler.

Trying to mix this could cause problems on *nix where ctypes is a corner stone, and different choices introduced by Delphi/BCB/Radserver could hurt. So please keep them apart.

The redefinition of longint in that list demonstrates how dangerous it is.

Michael Van Canneyt

2017-03-11 10:30

administrator   ~0098809

Added to objpas unit.
They are declared in the system unit in Delphi, so this is where they belong.

These types have nothing to do with C++, see:
http://docwiki.embarcadero.com/RADStudio/Berlin/en/Simple_Types_(Delphi)

Embarcadero is just making a huge mess of their types.

silvioprog

2017-03-14 18:48

reporter   ~0098907

Thanks dudes! :-)

Issue History

Date Modified Username Field Change
2017-03-09 23:09 silvioprog New Issue
2017-03-10 07:54 Thaddy de Koning Note Added: 0098786
2017-03-10 08:04 Michael Van Canneyt Assigned To => Michael Van Canneyt
2017-03-10 08:04 Michael Van Canneyt Status new => assigned
2017-03-10 15:22 silvioprog Note Added: 0098806
2017-03-10 15:23 silvioprog Note Edited: 0098806 View Revisions
2017-03-10 23:47 Marco van de Voort Note Added: 0098807
2017-03-10 23:48 Marco van de Voort Note Edited: 0098807 View Revisions
2017-03-10 23:50 Marco van de Voort Note Edited: 0098807 View Revisions
2017-03-11 10:30 Michael Van Canneyt Fixed in Revision => 35560
2017-03-11 10:30 Michael Van Canneyt Note Added: 0098809
2017-03-11 10:30 Michael Van Canneyt Status assigned => resolved
2017-03-11 10:30 Michael Van Canneyt Fixed in Version => 3.1.1
2017-03-11 10:30 Michael Van Canneyt Resolution open => fixed
2017-03-11 10:30 Michael Van Canneyt Target Version => 3.2.0
2017-03-14 18:48 silvioprog Note Added: 0098907
2017-03-14 18:48 silvioprog Status resolved => closed