Skip to content

Add source code print out to error messages

Add source code print out with line numbers and an arrow pointing to the column where the error happened. These source code print outs can be disabled using the -cti-no-source flag.

The -cti-single-line flag implies -cti-no-source.

Example

int main () {
    a = fooo('3');
    return 137;
}

Will give:

**  1: Loading SAC program ...
**  2: Preprocessing type patterns ...
**  3: Preprocessing SAC program ...
**  4: Running module system ...
**  5: Simplifying source code ...
**  6: Converting to static single assignment form ...
./Simple.sac:2:9: abort:
  1. int main () {
  2.     a = fooo('3');

  3.     return 137;
  4. }
  
  No definition found for a function "_MAIN::fooo" that expects 1 argument(s) and yields 1 return value(s)
Compilation failed while Converting to static single assignment form.
Edited by Quinten Cabo

Merge request reports