From bf5d173bc65aea071e5ffdf593f6b8797b56816d Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Tue, 8 Aug 2023 17:53:21 +0800 Subject: [PATCH] fixes LineTooLong hints on old compilers (#22412) * fixes LineTooLong hints on old compilers * fixes config/nim.cfg --- compiler/condsyms.nim | 1 + compiler/nim.cfg | 1 + config/nim.cfg | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/compiler/condsyms.nim b/compiler/condsyms.nim index 58b89d9330..638cb5c1ef 100644 --- a/compiler/condsyms.nim +++ b/compiler/condsyms.nim @@ -160,3 +160,4 @@ proc initDefines*(symbols: StringTableRef) = defineSymbol("nimHasEnsureMove") defineSymbol("nimUseStrictDefs") + defineSymbol("nimHasNolineTooLong") diff --git a/compiler/nim.cfg b/compiler/nim.cfg index 4c55a04cbc..0400536851 100644 --- a/compiler/nim.cfg +++ b/compiler/nim.cfg @@ -50,3 +50,4 @@ define:useStdoutAsStdmsg warningAsError[Uninit]:on warningAsError[ProveInit]:on @end + diff --git a/config/nim.cfg b/config/nim.cfg index 1470de7805..7a2d5c76ef 100644 --- a/config/nim.cfg +++ b/config/nim.cfg @@ -14,6 +14,10 @@ cc = gcc # additional options always passed to the compiler: --parallel_build: "0" # 0 to auto-detect number of processors +@if not nimHasNolineTooLong: + hint[LineTooLong]=off +@end + @if nimHasAmbiguousEnumHint: # not needed if hint is a style check hint[AmbiguousEnum]=off