Interface StaticAssertionNode

All Superinterfaces:
ASTNode, BlockItemNode

public interface StaticAssertionNode extends BlockItemNode
A static assertion has syntax _Static_assert ( constant-expression , string-literal ). It may appear anywhere an external definition may appear, i.e., in the outermost file scope. It is an assertion which is checked statically (i.e., at "compile time"). The constant expression is evaluated. If it is 0, a violation is reported.
  • Method Details

    • getExpression

      ExpressionNode getExpression()
      Gets the constant expression argument from this static assertion.
      Returns:
      the constant expression argument
    • getMessage

      StringLiteralNode getMessage()
      Gests the string literal message argument from this static assertion. This is the message printed if the assertion is violated.
      Returns:
      the string literal argument
    • copy

      Description copied from interface: ASTNode
      Returns a deep copy of this AST node. The node and all of its descendants will be cloned. The cloning does not copy analysis or attribute information.
      Specified by:
      copy in interface ASTNode
      Specified by:
      copy in interface BlockItemNode
      Returns:
      deep copy of this node