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

Fix nonstandard C++ in headers #7194

Open
wants to merge 2 commits into
base: development
Choose a base branch
from

Commits on Mar 1, 2023

  1. Fix PAKE structure initializers to work in C++11

    The PAKE structure initialization uses a named initializer, which is not
    supported in versions of C++ that are still widespread. The named
    initializer doesn't really help here, so get rid of it. More generally, this
    commit simplifies the initialization of the structure by always including
    the dummy field.
    
    Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
    gilles-peskine-arm committed Mar 1, 2023
    Configuration menu
    Copy the full SHA
    8943610 View commit details
    Browse the repository at this point in the history
  2. Build cpp_dummy_build in C++11 pedantic mode

    This avoids us accidentally using language features in headers that are not
    present in standard C++ or were added very recently.
    
    I used C++11 as the cutoff because our code base relies on several features
    that aren't present in C++98, including commas at the end of enumerator
    lists which have been present in the Mbed TLS code base since the PolarSSL
    days.
    
    Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
    gilles-peskine-arm committed Mar 1, 2023
    Configuration menu
    Copy the full SHA
    7b4eff9 View commit details
    Browse the repository at this point in the history