summaryrefslogtreecommitdiff
path: root/mk/warnings.mk
Commit message (Collapse)AuthorAgeFilesLines
* Simplify Configure in a few waysJohn Ericson2019-10-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - No need to distinguish between gcc-llvm and clang. First of all, gcc-llvm is quite old and surely unmaintained by now. Second of all, none of the code actually care about that distinction! Now, it does make sense to consider C multiple frontends for LLVMs in the form of clang vs clang-cl (same clang, yes, but tweaked interface). But this is better handled in terms of "gccish vs mvscish" and "is LLVM", yielding 4 combinations. Therefore, I don't think it is useful saving the existing code for that. - Get the remaining CC_LLVM_BACKEND, and also TABLES_NEXT_TO_CODE in mk/config.h the normal way, rather than hacking it post-hoc. No point keeping these special cases around for now reason. - Get rid of hand-rolled `die` function and just use `AC_MSG_ERROR`. - Abstract check + flag override for unregisterised and tables next to code. Oh, and as part of the above I also renamed/combined some variables where it felt appropriate. - GccIsClang -> CcLlvmBackend. This is for `AC_SUBST`, like the other Camal case ones. It was never about gcc-llvm, or Apple's renamed clang, to be clear. - llvm_CC_FLAVOR -> CC_LLVM_BACKEND. This is for `AC_DEFINE`, like the other all-caps snake case ones. llvm_CC_FLAVOR was just silly indirection *and* an odd name to boot.
* Update Wiki URLs to point to GitLabTakenobu Tani2019-03-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | This moves all URL references to Trac Wiki to their corresponding GitLab counterparts. This substitution is classified as follows: 1. Automated substitution using sed with Ben's mapping rule [1] Old: ghc.haskell.org/trac/ghc/wiki/XxxYyy... New: gitlab.haskell.org/ghc/ghc/wikis/xxx-yyy... 2. Manual substitution for URLs containing `#` index Old: ghc.haskell.org/trac/ghc/wiki/XxxYyy...#Zzz New: gitlab.haskell.org/ghc/ghc/wikis/xxx-yyy...#zzz 3. Manual substitution for strings starting with `Commentary` Old: Commentary/XxxYyy... New: commentary/xxx-yyy... See also !539 [1]: https://gitlab.haskell.org/bgamari/gitlab-migration/blob/master/wiki-mapping.json
* Turn on -Wno-unused-imports in make build systemMatthew Pickering2019-02-021-0/+3
| | | | This mirrors Hadrian and it good enough to get us unstuck.
* ghc-prim: Emulate C11 atomics when not availableBen Gamari2018-02-031-1/+3
| | | | | | | | | | | | | | | | | | GCC's __sync primitives apparently "usually" imply a full barrier, meaning they can be used to emulate the more precise C11 atomics albeit with a loss of efficiency. This restores compatibility with GCC 4.4. This partially reverts commit 59de290928e6903337f31c1f8107ac8a98ea145d. Test Plan: Validate on Centos Reviewers: hvr, simonmar, trommler Subscribers: rwbarton, thomie, erikd, carter GHC Trac Issues: #14244 Differential Revision: https://phabricator.haskell.org/D4364
* Typos in commentsGabor Greif2018-01-171-2/+2
|
* Update autoconf test for gcc to require 4.7 and upPeter Trommler2017-11-061-5/+1
| | | | | | | | | | | | | | | | | | | Fixing #14244 required the newer gcc atomic built-ins that are provided from 4.7 and up. This updates the test to check for minimum gcc version 4.7. The version tests for 3.4 (!), 4.4, and 4.6 are no longer needed and can be removed. This makes the build system simpler. Test Plan: validate Reviewers: austin, bgamari, hvr, simonmar Reviewed By: bgamari Subscribers: rwbarton, thomie, erikd Differential Revision: https://phabricator.haskell.org/D4165
* Enable -Wcpp-undef for GHC and runtime systemBen Gamari2017-08-181-3/+8
| | | | | | | | | | | | | | | | This gets us much of the benefit of enabling it globally, which avoiding (at least for now) the pain of making the core libraries build as well. See #13636. Test Plan: Validate Reviewers: erikd, austin Subscribers: rwbarton, thomie GHC Trac Issues: #13636 Differential Revision: https://phabricator.haskell.org/D3517
* Enable building Cabal with parsecHerbert Valerio Riedel2017-08-011-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Cabal's parser has been rewritten in terms of Parsec (which is not enabled yet in Cabal-2.0 by default, but can be enabled by a cabal flag). The plan for Cabal is to drop support for the non-parsec parser, so we need to prepare GHC to cope with new situation. However, this means that lib:Cabal requires three new library dependency submodules, - parsec - text - mtl What complicates matters is that we need to build `ghc-cabal` early on during the bootstrap phase which currently needs to invoke `ghc --make` directly. So these additional dependencies need to be integrated into the monolithic `ghc --make` invocation which produces the `ghc-cabal` executable. Test Plan: `./validate --fast` passed Reviewers: austin, bgamari Subscribers: erikd, phadej, rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3757
* Disable -Wcpp-undef for nowBen Gamari2017-04-301-2/+2
| | | | | We at very least need to upstream a patch for the time submodule to compile on OS X.
* Enable new warning for fragile/incorrect CPP #if usageErik de Castro Lopo2017-04-281-2/+2
| | | | | | | | | | | | | | | | The C code in the RTS now gets built with `-Wundef` and the Haskell code (stages 1 and 2 only) with `-Wcpp-undef`. We now get warnings whereever `#if` is used on undefined identifiers. Test Plan: Validate on Linux and Windows Reviewers: austin, angerman, simonmar, bgamari, Phyx Reviewed By: bgamari Subscribers: thomie, snowleopard Differential Revision: https://phabricator.haskell.org/D3278
* Revert "Enable new warning for fragile/incorrect CPP #if usage"Ben Gamari2017-04-051-2/+2
| | | | | | | | This is causing too much platform dependent breakage at the moment. We will need a more rigorous testing strategy before this can be merged again. This reverts commit 7e340c2bbf4a56959bd1e95cdd1cfdb2b7e537c2.
* Enable new warning for fragile/incorrect CPP #if usageErik de Castro Lopo2017-04-051-2/+2
| | | | | | | | | | | | | | | | The C code in the RTS now gets built with `-Wundef` and the Haskell code (stages 1 and 2 only) with `-Wcpp-undef`. We now get warnings whereever `#if` is used on undefined identifiers. Test Plan: Validate on Linux and Windows Reviewers: austin, angerman, simonmar, bgamari, Phyx Reviewed By: bgamari Subscribers: thomie, snowleopard Differential Revision: https://phabricator.haskell.org/D3278
* Don't error on GCC inlining warning in rtsBartosz Nitka2016-06-221-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The warning for reference: ``` rts/RaiseAsync.c: In function ‘throwToMsg’: rts/SMPClosureOps.h:65:0: error: error: inlining failed in call to ‘lockClosure’: call is unlikely and code size would grow rts/RaiseAsync.c:305:0: error: error: called from here rts/SMPClosureOps.h:65:0: error: error: inlining failed in call to ‘lockClosure’: call is unlikely and code size would grow ``` This warning triggers on `gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)` and it doesn't trigger with new GCCs. Test Plan: build ghc/rts Reviewers: bgamari, simonmar, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2353
* Suppress the warning about __sync_fetch_and_nand (#9678)Thomas Miedema2016-05-241-0/+5
|
* Warn about simplifiable class constraintsSimon Peyton Jones2016-04-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provoked by Trac #11948, this patch adds a new warning to GHC -Wsimplifiable-class-constraints It warns if you write a class constraint in a type signature that can be simplified by an existing instance declaration. Almost always this means you should simplify it right now; type inference is very fragile without it, as #11948 shows. I've put the warning as on-by-default, but I suppose that if there are howls of protest we can move it out (as happened for -Wredundant-constraints. It actually found an example of an over-complicated context in CmmNode. Quite a few tests use these weird contexts to trigger something else, so I had to suppress the warning in those. The 'haskeline' library has a few occurrences of the warning (which I think should be fixed), so I switched it off for that library in warnings.mk. The warning itself is done in TcValidity.check_class_pred. HOWEVER, when type inference fails we get a type error; and the error suppresses the (informative) warning. So as things stand, the warning only happens when it doesn't cause a problem. Not sure what to do about this, but this patch takes us forward, I think.
* Silence unused-import warning introduced by 93d85af9fec968bHerbert Valerio Riedel2016-04-171-0/+1
|
* Update transformer submodule to v0.5.2.0 releaseHerbert Valerio Riedel2016-02-261-0/+1
| | | | | | | Most notably, this update pulls in documentation improvements and several INLINE pragmas for significant performance gains[1]. [1]: https://groups.google.com/d/msg/haskell-cafe/SUKtkDI84EE/fXMBd-jNDQAJ
* Enable RemoteGHCi on WindowsTamar Christina2016-01-271-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Makes the needed changes to make RemoteGHCi work on Windows. The approach passes OS Handles areound instead of the Posix Fd as on Linux. The reason is that I could not find any real documentation about the behaviour of Windows w.r.t inheritance and Posix FDs. The implementation with Fd did not seem to be able to find the Fd in the child process. Instead I'm using the much better documented approach of passing inheriting handles. This requires a small modification to the `process` library. https://github.com/haskell/process/pull/52 Test Plan: ./validate On Windows x86_64 Reviewers: thomie, erikd, bgamari, simonmar, austin, hvr Reviewed By: simonmar Subscribers: #ghc_windows_task_force Differential Revision: https://phabricator.haskell.org/D1836 GHC Trac Issues: #11100
* Typos in docs and commentsGabor Greif2016-01-071-4/+4
|
* Update binary submodule to final 0.8.0.0 releaseHerbert Valerio Riedel2015-12-201-4/+2
| | | | | | | Also, `binary` now is almost warning free (except for inlinePerformIO deprecation warnings) /cc @kolmodin
* Update time submodule to v1.6 releaseHerbert Valerio Riedel2015-12-201-3/+1
| | | | | | This is the designated release to go with GHC 8.0.1 /cc @AshleyYakeley
* Use `-Wno-tabs` more targettedHerbert Valerio Riedel2015-12-181-10/+3
| | | | | | | So far only `time` (fixed upstream already though) and `xhtml` still require `-Wno-tabs`, so let's apply that warning suppression flag only there. This also updates the haskeline submodule to pull in a tab-fix
* Update containers submodule to v0.5.7.0 releaseHerbert Valerio Riedel2015-12-181-5/+0
| | | | | | | | | This is the designated release to go with GHC 8.0.1 This release doesn't need any warning-suppression flags anymore, so remove those from mk/warnings.mk /cc @foxik
* Suppress warnings when compiling primitive and randomThomas Miedema2015-12-171-0/+5
| | | | | And fix a redundant constraint warning in a test that requires primitive.
* Remove warning-suppression flags for CabalHerbert Valerio Riedel2015-12-171-5/+0
| | | | | | Cabal is currently warning free. So let's drop the `-w`-flags. /cc @dcoutts
* Start using `-W` instead of `-f(no-)warn` in some placesHerbert Valerio Riedel2015-12-161-26/+31
| | | | | | | | | | | | | | | | | | This replaces some occurences of `-f(no-)warn` with the new `-W`-aliases introduced via 2206fa8cdb120932 / #11218, in cases which are guaranteed to be invoked with recent enough GHC (i.e. the stage1+ GHC). After this commit, mostly the compiler and the testsuite remain using `-f(wo-)warn...` because the compiler needs to be bootstrappable with older GHCs, while for the testsuite it's convenient to be able to quickly compare the behavior to older GHCs (which may not support the new flags yet). The compiler-part can be updated to use the new flags once GHC 8.3 development starts. Reviewed By: quchen Differential Revision: https://phabricator.haskell.org/D1637
* Enable non-canonical Monad instance warnings for stage1/2Herbert Valerio Riedel2015-12-051-0/+2
| | | | | | | | | | | | | | This makes use of the new facility introduced via 14d0f7f1221db758cd06a69f53803d9d0150164a which allows to have certain flags passed only to the non-bootstrapping GHC. This is needed because sometimes we can't assume the existence of a certain flag in the bootstrapping compiler which was only added recently to GHC HEAD. This also updates the haddock submodule to fix a few remaining noncanonical instance definitions. Differential Revision: https://phabricator.haskell.org/D1571
* Build system: Add stage specific SRC_HC_(WARNING_)OPTSThomas Miedema2015-12-011-9/+35
| | | | | | | | | | | | | | | | | | * Add stage specific versions of SRC_HC_OPTS. These are currently only used for -Werror. The previous combination of GhcStage2HcOpts and GhcLibHcOpts didn't apply to utils/*. * Add stage specific versions of SRC_HC_WARNING_OPTS. These will later be used for new warning supression flags that should not be passed to the bootstrap compiler. * Move -Wall (and -Werror) related code back to mk/warnings.mk, where it was before 987d54274. Now all warning related code is nicely together. Include mk/warnings.mk after mk/custom-settings.mk to make this work. Reviewed By: bgamari, hvr Differential Revision: https://phabricator.haskell.org/D1536
* Build system: renable -Wall on validate (base)Thomas Miedema2015-11-031-3/+0
| | | | | | | | | | | | | | | | Problem: 'SRC_HC_OPTS += -Wall' in 'mk/warnings.mk' was getting overwritten by 'SRC_HC_OPTS = ...' in 'mk/flavours/*.mk'. It didn't affect the compiler or most other libraries, because most .cabal files define 'ghc-options: -Wall'. Bug introduced in commit 2c24fd707f8650205bb574ffac5f376239af3723, when moving validate settings from 'mk/validate-settings.mk' to 'mk/flavours/validate.mk'. Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D1425
* Update parallel submodule, and re-enable warningsSimon Marlow2015-08-031-1/+0
| | | | | | | | | | | | Test Plan: using remote validate Reviewers: austin, hvr, simonpj, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1117
* The parallel package has warningsSimon Peyton Jones2015-07-301-0/+1
| | | | | | | | | | | | | | | | | | | This patch suppresses them until they are fixed libraries/parallel/Control/Parallel/Strategies.hs:513:2: warning: Rule "parList/rseq" may never fire because ‘rseq’ might inline first Probable fix: add an INLINE[n] or NOINLINE[n] pragma for ‘rseq’ libraries/parallel/Control/Parallel/Strategies.hs:582:1: warning: Rule "evalBuffer/rseq" may never fire because ‘rseq’ might inline first Probable fix: add an INLINE[n] or NOINLINE[n] pragma for ‘rseq’ libraries/parallel/Control/Parallel/Strategies.hs:583:1: warning: Rule "parBuffer/rseq" may never fire because ‘rseq’ might inline first Probable fix: add an INLINE[n] or NOINLINE[n] pragma for ‘rseq’
* Fallout from more assiduous RULE warningsSimon Peyton Jones2015-07-281-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GHC now warns if rules compete, so that it's not predicatable which will work and which will not. E.g. {-# RULES f (g x) = ... g True = ... #-} If we had (f (g True)) it's not clear which rule would fire. This showed up fraility in the libraries. * Suppress warnigns in Control.Arrow, Control.Category for class methods. At the moment we simply don't have a good way to write a RULE with a class method in the LHS. See Trac #1595. Arrow and Category attempt to do so; I have silenced the complaints with -fno-warn-inline-rule-shadowing, but it's not a great solution. * Adjust the NOINLINE pragma on 'GHC.Base.map' to account for the map/coerce rule * Adjust the rewrite rules in Enum, especially for the "literal 1" case. See Note [Enum Integer rules for literal 1]. * Suppress warnings for 'bytestring' e.g. libraries/bytestring/Data/ByteString.hs:895:1: warning: Rule "ByteString specialise break (x==)" may never fire because rule "Class op ==" for ‘==’ might fire first Probable fix: add phase [n] or [~n] to the competing rule
* Make template-haskell build with GHC 7.6, fixes bootstrap build.Edward Z. Yang2015-05-111-4/+0
| | | | | | | | | | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate on 7.6 Reviewers: austin, goldfire Subscribers: bgamari, thomie Differential Revision: https://phabricator.haskell.org/D885
* Support stage 1 Template Haskell (non-quasi) quotes, fixes #10382.Edward Z. Yang2015-05-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This commit adds stage 1 support for Template Haskell quoting, e.g. [| ... expr ... |], which is useful for authors of quasiquoter libraries that do not actually need splices. The TemplateHaskell extension now does not unconditionally fail; it only fails if the renamer encounters a splice that it can't run. In order to make sure the referenced data structures are consistent, template-haskell is now a boot library. There are some minor BC changes to template-haskell to make it boot on GHC 7.8. Note for reviewer: big diff changes are simply code being moved out of an ifdef; there was no other substantive change to that code. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, austin, goldfire Subscribers: bgamari, thomie Differential Revision: https://phabricator.haskell.org/D876 GHC Trac Issues: #10382
* Revert stage 1 template-haskell. This is a combination of 5 commits.Edward Z. Yang2015-05-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | Revert "Quick fix: drop base bound on template-haskell." This reverts commit 3c70ae032e4361b203dfcf22b0a424e8838a5037. Revert "Always do polymorphic typed quote check, c.f. #10384" This reverts commit 9a43b2c1f78b3cf684646af64b9b67dc8079f58f. Revert "RnSplice's staging test should be applied for quotes in stage1." This reverts commit eb0ed4030374af542c0a459480d32c8d4525e48d. Revert "Split off quotes/ from th/ for tests that can be done on stage1 compiler." This reverts commit 21c72e7d38c96ac80d31addf67ae4b3c7a6c3bbb. Revert "Support stage 1 Template Haskell (non-quasi) quotes, fixes #10382." This reverts commit 28257cae77023f2ccc4cc1c0cd1fbbd329947a00.
* Support stage 1 Template Haskell (non-quasi) quotes, fixes #10382.Edward Z. Yang2015-05-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This commit adds stage 1 support for Template Haskell quoting, e.g. [| ... expr ... |], which is useful for authors of quasiquoter libraries that do not actually need splices. The TemplateHaskell extension now does not unconditionally fail; it only fails if the renamer encounters a splice that it can't run. In order to make sure the referenced data structures are consistent, template-haskell is now a boot library. In the following patches, there are: - A few extra safety checks which should be enabled in stage1 - Separation of the th/ testsuite into quotes/ which can be run on stage1 Note for reviewer: big diff changes are simply code being moved out of an ifdef; there was no other substantive change to that code. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, austin, goldfire Subscribers: bgamari, thomie Differential Revision: https://phabricator.haskell.org/D876 GHC Trac Issues: #10382
* Disable same warnings for normal builds as for validate (#10223)Thomas Miedema2015-04-021-0/+118
The default validate settings currently disable some warnings in the libraries. This patch moves those settings to a new file called `mk/warnings.mk`, and applies them also to normal builds. Through uncommenting a line in build.mk, developers can now build with -Werror. -Werror is not the default, because: * We can not guarantee that the build is warning free on platforms we don't run regularly run validate (as part of continuous integration systems), and we still want the build to go through on those platforms. * quoting rwbarton on irc > "I think -Werror by default has come up in the past and the argument was that it is too annoying when you are doing nontrivial development" Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D785