We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This comes back to the question in #2354. Are these sorts of parameters allowed?
bit<8> do_function1(in int val1) { return 8w1; } bit<8> do_function2(inout bit<8> val0, in int val1) { val0 = val1; return 8w1; } control ingress(inout Headers h, inout Meta m, inout standard_metadata_t sm) { apply { bit<8> tmp = 8w1; do_function1(1); do_function2(tmp, 1); } }
In this case, I get an error which says:
... InlineActions_3_RemoveAllUnusedDeclarations FrontEnd_44_InlineActions P4::TypeChecking_0_ResolveReferences P4::TypeChecking_1_TypeInference InlineFunctions_0_TypeChecking InlineFunctions_1_DiscoverFunctionsInlining InlineFunctions_2_InlineDriver PassRepeated_0_ResolveReferences PassRepeated_1_RemoveUnusedDeclarations PassRepeated_2_ResolveReferences PassRepeated_3_RemoveUnusedDeclarations RemoveAllUnusedDeclarations_0_PassRepeated InlineFunctions_3_RemoveAllUnusedDeclarations P4::TypeChecking_2_ResolveReferences [--Werror=type-error] error: val1_1: Cannot declare variables with type int
Which also does not seem correct, maybe caused by the latest changes. Should declaration be a Declaration_Constant?
Declaration_Constant
int_function_arguments.p4.txt
The text was updated successfully, but these errors were encountered:
This should be fixed by #2360, but it's not easy to check since this is not a full program.
Sorry, something went wrong.
Forgot the attachment.
mihaibudiu
No branches or pull requests
This comes back to the question in #2354. Are these sorts of parameters allowed?
In this case, I get an error which says:
Which also does not seem correct, maybe caused by the latest changes. Should declaration be a
Declaration_Constant
?int_function_arguments.p4.txt
The text was updated successfully, but these errors were encountered: