@@ -1893,10 +1893,11 @@ def log(self):
1893
1893
class WNOVER (DMLWarning ):
1894
1894
"""
1895
1895
A DML file must start with a version statement, such as `dml 1.4;`
1896
- """
1897
- fmt = "file has no version tag, assuming version 1.2"
1898
1896
1897
+ This warning becomes an error in Simics API 8 and newer, when the
1898
+ compatibility feature `optional_version_statement` is disabled.
1899
1899
"""
1900
+ fmt = "file has no version tag, assuming version 1.2"
1900
1901
1901
1902
class WNDOCRA (DMLWarning ):
1902
1903
"""
@@ -1916,10 +1917,11 @@ class WNEGOFFS(DMLWarning):
1916
1917
1917
1918
class WUNUSEDDEFAULT (DMLWarning ):
1918
1919
"""
1919
- The object is not referenced anywhere but it matches a name of an
1920
- object automatically referenced in another scope . This is the same
1921
- as WUNUSED but only for known common errors and it will never be
1922
- emitted if WUNUSED is enabled .
1920
+ In DML 1.2, it is usually a mistake to implement a method named
1921
+ `after_write` in a field, because only register objects recognize that
1922
+ method. The `WUNUSEDDEFAULT` warning captures this kind of mistake
1923
+ by reporting a warning when a method is implemented that is unused,
1924
+ but whose name matches a method commonly implemented in other objects.
1923
1925
"""
1924
1926
fmt = "unused: %s methods are not called automatically for %s objects in %s"
1925
1927
def __init__ (self , obj ):
@@ -1945,11 +1947,11 @@ class WUNUSED_DML12(DMLWarning):
1945
1947
def __init__ (self , obj ):
1946
1948
DMLWarning .__init__ (self , obj , obj .name )
1947
1949
1948
-
1949
1950
class WSIZEOFTYPE (DMLWarning ):
1950
1951
"""
1951
- The 'sizeof' operator is used on a type name , but expects an
1952
- expression . Use the 'sizeoftype' operator for types .
1952
+ In DML 1.4 it is an error to pass a type name as the operand of `sizeof`.
1953
+ In DML 1.2 it instead emits a `WSIZEOFTYPE` warning, for legacy reasons.
1954
+ To get the size of a type, the `sizeoftype` operator should be used.
1953
1955
"""
1954
1956
fmt = "sizeof on a type is not legal, use sizeoftype instead"
1955
1957
@@ -2007,8 +2009,8 @@ class WWRNSTMT(DMLWarning):
2007
2009
class WREF (DMLWarning ):
2008
2010
"""An unused parameter refers to an object that has not been declared.
2009
2011
2010
- This warning message will be replaced with a hard error in future
2011
- major versions of Simics .
2012
+ This warning message is replaced with a hard error for modules compiled
2013
+ with Simcis API 6 or newer .
2012
2014
"""
2013
2015
instances = []
2014
2016
fmt = "unused parameter %s contains %s"
0 commit comments