C++ to C Compiler


Release Notes

emmtrix LLVM Tools

Release 2022.10

emmtrix C++-to-C compiler

New language features

  • Switched to C++14 language standard
  • Significantly improved template compatibility
  • Unions
  • Anonymous unions within functions
  • Enums with fixed underlying type (e.g. enum e : int)
  • Scoped enums
  • if/switch statements with variable and/or initializer (e.g. if (int a = ...; int b = ...))
  • User-defined literals
  • wchar_t, char16_t and char32_t data types
  • Lambda expressions
  • Pointers to members (preliminary)
  • Pointers to data members as well as the .* and ->* operators
  • Pointers to member functions as well as the .* and ->* operators
  • Derived-to-base casts of pointers to member functions is not full supported
  • Variadic functions with no explicit parameters that are forbidden in C (e.g. void func(...))
  • Using-declaration in class/struct definitions
  • Ref-qualified member functions (e.g. void mf2() &)
  • Volatile qualified member functions (e.g. void mf2() volatile)
  • Binary conditional operator (a ?: b)
  • sizeof... operator
  • __underlying_type operator
  • Placement new operator
  • alignof operator
  • Anonymous namespaces
  • thread_local variables
  • C++11-style attributes (e.g. [[maybe_unused]])
  • Replacing [[noreturn]] attributes by _Noreturn keyword
  • Removing [[fallthrough]] attributes
  • Replacing other attributes by gcc-style attributes (e.g. __attribute__((deprecated)))
  • Explicit template instantiation (e.g. template T<int>;)
  • Complex list initialization of structs/classes (e.g STRUCT s = {0, g, 1})
  • int{} and int{val} initialization of fundamental data types
  • Functional casts with braced init lists (e.g. T{x, y})
  • __func__, __FUNCTION__ and __PRETTY_FUNCTION__ macros
  • __builtin_FUNCTION, __builtin_FILE, __builtin_LINE and __builtin_COLUMN builtin functions
  • __builtin_constant_p builtin function
  • __builtin_addressof builtin function
  • __builtin_operator_delete and __builtin_operator_new builtin functions

Command line options

  • Added command line option -output-min-record-size-attr to enable min_record_size attribute in output code
  • Added command line option -output-nonnull-attr=false to disable nonnull attribute in output code
  • Added command line option -output-linkage-attr to enable linkage attribute in output code


  • Supporting attributed functions (e.g. __stdcall)
  • Supporting nested decltype and auto return type expressions
  • Correctly generating array size cookie for new[] expressions with non-trivial destructors
  • Bugfix: Constant global variables with initializer containing comma operator
  • Avoiding nested struct declarations in generated C code
  • Supporting constexpr function calls as case labels
  • Fixed handling of static class/struct member variables
  • Supporting nested template classes
  • Supporting zero length arrays and flexible array members
  • Adding names for anonymous structs
  • Using nonnull attribute for function arguments that were previously references
  • Supporting correct generation of empty structs/classes (by using custom min_record_size attribute)
  • Improved generation of temporaries and copy elision
  • Ensuring that enum enumerators are unique (e.g. after removing namespaces)
  • Supporting nested structs/classes with the same name by applying mangling to record names

emx-clang / emx-clang++

  • Added linkage attribute to explicitly specify the LLVM linkage type of global variables and functions
  • Added min_record_size attribute to specify the minimum size of a record

For more information on emmtrix Parallel Studio or to request a demo, use our contact form or get directly in touch. You may also make a Product Evaluation Request and/or a Project RequestWe’re looking forward to hearing from you!

Portrait Rainer Heim

Rainer Heim

Cookie Consent with Real Cookie Banner