Skip to content

Update to support newest 3c and Checked C clang #1

@mwhicks1

Description

@mwhicks1

Running this tutorial when using clang and 3c built from commit correctcomputation/checkedc-clang@2a0df40 yields some differences:

  1. Instead of running into trouble with bignum_to_string in tests like golden.c, first, as it is presented in the README, the problem with bignum_from_string's use of &str[i] in bn.c and bn.h arises first. You can fix it just like the README says, though the original inferred type is not quite what is shown. When you do the fix, then the problems with bignum_to_string show up, and you fix those as prescribed.

  2. This updated Checked C clang does not require printf, snprintf, etc. to be put in an _Unchecked block. As such, there are fewer unchecked blocks needed than are prescribed. Basically, only sscanf and the user-added bignum_from_string_using_strlen need to be in an unchecked block.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions