|Anonymous | Login | Signup for a new account||2018-06-20 19:32 CEST|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0007728||OCaml||compiler driver||public||2018-02-17 18:55||2018-02-18 17:44|
|Target Version||Fixed in Version|
|Summary||0007728: this time strange compiler behavior in separate compilation with several semicolons and characters after|
|Description||If a line has three semicolons, there is an error. If it has four semicolons, there is no error. And so on, there is an error for semicolons that are odd number and no error for semicolons that are even number.|
let a = 12;; (* OK *)
let a = 12;;; (* error *)
let a = 12;;;; (* OK *)
let a = 12;;;;; (* error *)
... and so on.
let a = 12;;12 (* Error: This expression has type int
This is not a function; it cannot be applied. *)
let a = 12;;12;; (* OK *)
let a = 12;;12;;; (* Error: Syntax error *)
let a = 12;;12;;;; (* OK *)
... and so on.
This does not seem to disturb the compilation and does not seem to
represent a potential danger.
|Tags||No tags attached.|
I already explained this to you at https://caml.inria.fr/mantis/view.php?id=7727#c18880 [^]
What's the point of this report?
Please, don't be a pain and report actual bugs only.
I do not want to be a pain for everyone. The goal was to show that we should not confuse "do nothing" with "no operation" as the NOP mnemonic microprocessors.
I tested about 20000 lines of code, compiled into an executable file, with only two semicolons on each line. At runtime, knowing that the processor power was between up to 3%, in less than a second the file generated a microprocessor power ranging from 50% to more than 70%, and then stabilize around 3%.
A "no operation" (NOP) takes less power. Although it may be useful in certain circumstances, as demonstrated by a developer, it does not mean "do nothing".
I only want to say that in Caml Light this generates an error. Today the syntax of OCaml is no longer the same as Caml Light, this is called the evolution of language. Something else, these two semicolons could become, perhaps, a security problem for the future, and this syntax given to these semicolons seemed to me to become a bug later. Maybe this concept is to be reviewed for improvement?
Sorry if I hurt someone.
|2018-02-17 18:55||vanto||New Issue|
|2018-02-17 19:12||xleroy||Note Added: 0018883|
|2018-02-17 19:12||xleroy||Status||new => resolved|
|2018-02-17 19:12||xleroy||Resolution||open => duplicate|
|2018-02-17 19:13||xleroy||Relationship added||duplicate of 0007727|
|2018-02-18 17:44||vanto||Note Added: 0018888|
|Copyright © 2000 - 2011 MantisBT Group|