Skip to content
Snippets Groups Projects
  1. May 08, 2024
  2. May 07, 2024
    • Arsen Arsenović's avatar
      Split out the C-- preprocessor, and make it pass -g0 · 25b0b404
      Arsen Arsenović authored and Marge Bot's avatar Marge Bot committed
      Previously, C-- was processed with the C preprocessor program.  This
      means that it inherited flags passed via -optc.  A flag that is somewhat
      often passed through -optc is -g.  At certain -g levels (>=2), GCC
      starts emitting defines *after* preprocessing, for the purposes of
      debug info generation.  This is not useful for the C-- compiler, and, in
      fact, causes lexer errors.  We can suppress this effect (safely, if
      supported) via -g0.
      
      As a workaround, in older versions of GCC (<=10), GCC only emitted
      defines if a certain set of -g*3 flags was passed.  Newer versions check
      the debug level.  For the former, we filter out those -g*3 flags and,
      for the latter, we specify -g0 on top of that.
      
      As a compatible and effective solution, this change adds a C--
      preprocessor distinct from the C compiler and preprocessor, but that
      keeps its flags.  The command line produced for C-- preprocessing now
      looks like:
      
        $pgmCmmP $optCs_without_g3 $g0_if_supported $optCmmP
      
      Closes: ghc/ghc#24474
      25b0b404
    • Arsen Arsenović's avatar
      Add the cmm_cpp_is_gcc predicate to the testsuite · 4d59abf2
      Arsen Arsenović authored and Marge Bot's avatar Marge Bot committed
      A future C-- test called T24474-cmm-override-g0 relies on the
      GCC-specific behaviour of -g3 implying -dD, which, in turn, leads to it
      emitting #defines past the preprocessing stage.  Clang, at least, does
      not do this, so the test would fail if ran on Clang.
      
      As the behaviour here being tested is ``-optCmmP-g3'' undoing effects of
      the workaround we apply as a fix for bug #24474, and the workaround was
      for GCC-specific behaviour, the test needs to be marked as fragile on
      other compilers.
      4d59abf2
    • Andrei Borzenkov's avatar
      Rename Solo# data constructor to MkSolo# (#24673) · 3b51995c
      Andrei Borzenkov authored and Marge Bot's avatar Marge Bot committed
      - data Solo# a = (# a #)
      + data Solo# a = MkSolo# a
      
      And `(# foo #)` syntax now becomes just a syntactic
      sugar for `MkSolo# a`.
      3b51995c
  3. May 06, 2024
  4. May 05, 2024
  5. May 04, 2024
  6. May 02, 2024
  7. May 01, 2024
Loading