Skip to content
New issue

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

Reject regular variadic functions #2748

Merged
merged 2 commits into from
Nov 21, 2023

Commits on Nov 20, 2023

  1. Emit an error on variadic non extern functions

    Variadic regular functions were recently added in the parser as they
    should be rejected in the ast validation pass. This commit add the ast
    validation pass rejecting this kind of variadic arguments.
    
    gcc/rust/ChangeLog:
    
    	* checks/errors/rust-ast-validation.cc (ASTValidation::visit): Add
    	ast validation pass to reject variadic arguments on regular functions.
    
    Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
    P-E-P committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    50a4c8d View commit details
    Browse the repository at this point in the history
  2. Add a test regular variadic functions errors

    Add a new regression test for the error message in regular function
    variadic errors during ast validation pass.
    
    gcc/testsuite/ChangeLog:
    
    	* rust/compile/non_foreign_variadic_function.rs: New test.
    
    Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
    P-E-P committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    07fe0b6 View commit details
    Browse the repository at this point in the history