You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current 0.10 compiler issues a warning for every location where when defined is not found true.
Example:
proc foo =
echo "foo"
when defined (x): echo "x"
when defined (x): echo "x"
when defined (x): echo "x"
when defined (x): echo "x"
when defined (x): echo "x"
foo()
Compiler output:
C:\Nimrod\bin>nim c a.nim
c:\nimrod\config\nim.cfg(42, 2) Hint: added path: 'C:\Users\U┼żivatel\.babel\pkgs\babel-0.4.0' [Path]
c:\nimrod\config\nim.cfg(42, 2) Hint: added path: 'C:\Users\U┼żivatel\.babel\pkgs\' [Path]
c:\nimrod\config\nim.cfg(43, 2) Hint: added path: 'C:\Users\U┼żivatel\.nimble\pkgs\' [Path]
Hint: used config file 'C:\Nimrod\config\nim.cfg' [Conf]
Hint: system [Processing]
Hint: a [Processing]
a.nim(3, 15) Warning: undeclared conditional symbol; use --symbol to declare it: x [User]
a.nim(4, 15) Warning: undeclared conditional symbol; use --symbol to declare it: x [User]
a.nim(5, 15) Warning: undeclared conditional symbol; use --symbol to declare it: x [User]
a.nim(6, 15) Warning: undeclared conditional symbol; use --symbol to declare it: x [User]
a.nim(7, 15) Warning: undeclared conditional symbol; use --symbol to declare it: x [User]
gcc.exe -c -w -IC:\Nimrod\lib -o c:\nimrod\bin\nimcache\a.o c:\nimrod\bin\nimcache\a.c
gcc.exe -o c:\nimrod\bin\a.exe c:\nimrod\bin\nimcache\stdlib_system.o c:\nimrod\bin\nimcache\a.o
Hint: operation successful (8869 lines compiled; 0.472 sec total; 15.153MB) [SuccessX]
C:\Nimrod\bin>
All five instances of when defined produce their own warning. What is --symbol doing here is not clear to me. The documentation gives no hint why this cmdline option even exists, what is wrong with --define.
Perhaps only the first generated warning should be shown.
A pragma/cmdline option to get rid of individual warnings would be also useful.
The text was updated successfully, but these errors were encountered:
Current 0.10 compiler issues a warning for every location where
when defined
is not found true.Example:
Compiler output:
All five instances of
when defined
produce their own warning. What is--symbol
doing here is not clear to me. The documentation gives no hint why this cmdline option even exists, what is wrong with--define
.Perhaps only the first generated warning should be shown.
A pragma/cmdline option to get rid of individual warnings would be also useful.
The text was updated successfully, but these errors were encountered: