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
The `deprecated` annotation has a required string argument that is a
9038
9081
message that will be printed by a compiler when a program is using the
9039
-
deprecated construct. This is mostly useful for annotating library
9040
-
constructs, such as externs.
9082
+
deprecated construct. This is mostly useful for annotating library
9083
+
constructs, such as externs. The parameter must be a local
9084
+
compile-time known value of type `string`.
9041
9085
9042
9086
[source,p4]
9043
9087
----
9044
-
@deprecated("Please use the 'check' function instead")
9088
+
#define DEPR_V1_2_2 "Deprecated in v1.2.2"
9089
+
@deprecated("Please use the 'check' function instead." ++ DEPR_V1_2_2)
9045
9090
extern Checker {
9046
9091
/* body omitted */
9047
9092
}
@@ -9053,7 +9098,8 @@ extern Checker {
9053
9098
The `noWarn` annotation has a required string argument that indicates
9054
9099
a compiler warning that will be inhibited. For example
9055
9100
`@noWarn("unused")` on a declaration will prevent a compiler warning
9056
-
if that declaration is not used.
9101
+
if that declaration is not used. The parameter must be a local
9102
+
compile-time known value of type `string`.
9057
9103
9058
9104
=== Target-specific annotations
9059
9105
@@ -9078,6 +9124,7 @@ The P4 compiler should provide:
9078
9124
9079
9125
* Clarified that numeric priorities cannot be assigned to entries of a table that has `const entries` (<<sec-entries>>).
9080
9126
* Clarified that `switch` statements are allowed in action and function bodies, and that `switch` statements with `action_run` expressions are only allowed in control `apply` blocks (<<sec-stmts>> and <<sec-switch-stmt>>).
9127
+
* Added support for compile-time string concatenation using `++` operator (<<sec-string-type>> and <<sec-string-ops>>).
9081
9128
9082
9129
=== Summary of changes made in version 1.2.5, released October 11, 2024
0 commit comments