flang the compiler proves your program cannot hang 0.7.41 GitHub Try in the browserTry it Русский

Compatibility: what will not change after 1.0

What in flang stays the same from release to release, and what may change? This page answers point by point and describes how deprecation is announced.

Draft. The promise takes effect with release 1.0.0. Until then the section Before 1.0 applies.

What is frozen in 1.0

A program written for 1.0 works with every 1.x release unchanged. The promise covers four things.

WhatWhat is promised
SyntaxA file that passes flang check in 1.0 passes it in every 1.x. Keywords keep their meaning. New constructs do not change how old programs are read.
FLANG_* error codesA code does not disappear and does not change its meaning. New codes are added.
Proof record formatA record made by flang check --proof in 1.0 is accepted by the checker program of every 1.x.
Command lineCommands, flags and exit codes stay. In --json output fields do not disappear and do not change type; new fields are added.

Only release 2.0 may break any of these four.

What may change

WhatHow it changes
Message textsThe wording of errors and warnings is edited in any release. Scripts should look at the FLANG_* code, not at the text.
Strength of the proof kernelIt only grows. A postcondition proved in 1.0 is proved in every 1.x.
Speed and memoryThey change both ways. Noticeable changes are named in the release note.
Generated codeThe text printed by flang emit changes. The behaviour of the program stays the same.
Experimental partsCommands and modules marked experimental in the help are not covered by the promise.

The growth of the kernel is checked on every release. An automatic check compares the list of proved postconditions with the list of the previous release. If the list got shorter, the release does not go out.

This growth has one consequence. A stronger kernel may find a counterexample to a wrong postcondition that used to be checked only by tests. Such a program stops passing flang check. That is a bug found in the program; it does not break the compatibility promise.

How deprecation is announced

A feature does not disappear without a warning. The order is always the same.

  1. In a minor release the feature starts to warn. flang check prints a warning with a code and names the replacement. The exit code does not change.
  2. In the next minor release the same place becomes an error.

The time between the steps is at least one minor release. Both steps are named in the release notes.

After 1.0 the second step for the four frozen things waits until 2.0: in 1.x they only warn. For everything else the order stays as above. Examples are the functions of the standard library and the keys of the .flangrc file.

What the version number means

The number is written x.y.z.

PartBefore 1.0 (0.y.z)After 1.0
xalways 0changes when a frozen thing breaks
ya release may break compatibility, after a warningnew features; old programs work
zfixes and new featuresfixes only

The suffix -rc.N marks a release candidate: 1.0.0-rc.1 comes before 1.0.0.

Before 1.0

Today the FLANG_* codes and the shapes of --json output are treated as compatible. The syntax still changes; every change is named in the release note.

Four steps remain before 1.0.

ReleaseWhat happens in it
0.8.0The deprecation order starts to apply. Everything that will be gone by 1.0 starts to warn.
0.9.0The warnings of 0.8 become errors. Syntax, codes, the record format and the command line take the form they will have in 1.0.
1.0.0-rc.NCandidates. Only fixes go into them.
1.0.0The promise of this page takes effect.

Next