View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0031516||FPC||RTL||public||2017-03-09 23:09||2017-03-14 18:48|
|Reporter||silvioprog||Assigned To||Michael Van Canneyt|
|Priority||normal||Severity||minor||Reproducibility||have not tried|
|Product Version||3.1.1||Product Build|
|Target Version||3.2.0||Fixed in Version||3.1.1|
|Summary||0031516: [FEATURE REQUEST] Types FixedInt and FixedUInt|
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':
The unit 'ctypes' already declares 'cint' and 'cuint', so unit system just need an alias for them.
|Tags||No tags attached.|
|Fixed in Revision||35560|
Since they are related to ctypes, why not define them in ctypes?
Does system already have a dependency on ctypes?
> 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. :-)
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.
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:
Embarcadero is just making a huge mess of their types.
||Thanks dudes! :-)|
|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|