Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Snippets
  • Sign up now
  • Login
  • Sign in / Register
  • FPC Source FPC Source
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Graph
    • Compare
    • Locked Files
  • Issues 1,354
    • Issues 1,354
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 72
    • Merge requests 72
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • FPC
  • FPCFPC
  • FPC SourceFPC Source
  • Issues
  • #32994
Closed
Open
Issue created Jan 09, 2018 by FPC Admin account@fpc_adminOwner

The Low and High functions allow an incorrect expression without errors

Original Reporter info from Mantis: SergeAnvarov @SergeAnvarov
  • Reporter name: Serge Anvarov

Description:

For Low and High functions, you can specify expressions inside parentheses where types and constants are intermixed.

Steps to reproduce:

program Project1;
var
  i: PtrInt;
begin
  i := High(Byte div 1); // Equal High(i) 
end;

Additional information:

For Low the same.

This can be Char + 'some', with {$LONGSTRINGS OFF}.

In Delphi, this causes a compilation error about the inadmissibility of using a type in an expression.

Mantis conversion info:

  • Mantis ID: 32994
  • Platform: Windows
  • Version: 3.0.4
  • Monitored by: » @KaiBurghardt (Kai Burghardt)
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking