GHC 8.4.1 has wrong __GLASGOW_HASKELL__
The title pretty much says it all. As following shell interaction shows, the macro expands into 804, but I expected that it should expand into 840. Was my expectation wrong?
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.4.1
$ cat /tmp/Test.hs
{-# LANGUAGE CPP #-}
hello = __GLASGOW_HASKELL__
$ cat /tmp/Test.hspp | sed -r '/^$/d' # preprocessed file has too much whitespace
{-# LINE 1 "/tmp/Test.hs" #-}
# 1 "/tmp/Test.hs"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 17 "/usr/include/stdc-predef.h" 3 4
# 7 "<command-line>" 2
# 1 "/home/sergey/projects/haskell/ghc/local-8.4.1/lib/ghc-8.4.1/include/ghcversion.h" 1
# 7 "<command-line>" 2
# 1 "/tmp/ghc20375_0/ghc_2.h" 1
# 7 "<command-line>" 2
# 1 "/tmp/Test.hs"
{-# LANGUAGE CPP #-}
hello = 804
Trac metadata
| Trac field | Value |
|---|---|
| Version | 8.4.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |