https://www.infoq.com/news/2023/05/gcc13-c2x-features/ BT QCon San Francisco (Oct 2-6): Learn what's next in software from world-class leaders pushing the boundaries. In-person or video-only pass to recordings. Register Close Toggle Navigation Facilitating the Spread of Knowledge and Innovation in Professional Software Development English edition * English edition * Chinese edition * Japanese edition * French edition Write for InfoQ Search [ ] [Search] Sign Up / Login Email [ ] Password [ ] [Login] Forgot password ? InfoQ Account Email [ ] [Send Recovery Email] Back to login Resend Activation [ ] [Resend] Back to login Login with: Google Microsoft Twitter Facebook Don't have an InfoQ account? Sign Up Logo - Back to homepage News Articles Presentations Podcasts Guides Topics Development * Java * Kotlin * .Net * C# * Swift * Go * Rust * JavaScript Featured in Development * Relearning C++ after C++11 C++ is an old but evolving language. It has been around for a long time, but has changed significantly, particularly since 2011. In this article, we will review a few of its most compelling new features, including ranges, lambdas, range-based for loops, and move semantics, all by practising with a vector. Relearning C++ after C++11 All in development Architecture & Design * Architecture * Enterprise Architecture * Scalability/Performance * Design * Case Studies * Microservices * Service Mesh * Patterns * Security Featured in Architecture & Design * From Cloud-Hosted to Cloud-Native with Rosemary Wang In this episode of the podcast, Rosemary Wang talks about the patterns and practices that help you move from cloud-hosted to cloud-native architecture and maximize the benefit and use of the cloud. The discussion covers essential application and infrastructure considerations, as well as cost and security concerns you need to think about when approaching a cloud-native architecture. From Cloud-Hosted to Cloud-Native with Rosemary Wang All in architecture-design AI, ML & Data Engineering * Big Data * Machine Learning * NoSQL * Database * Data Analytics * Streaming Featured in AI, ML & Data Engineering * Operationalizing Responsible AI in Practice Mehrnoosh Sameki discusses approaches to responsible AI and demonstrates how open source and cloud integrated ML help data scientists and developers to understand and improve ML models better. Operationalizing Responsible AI in Practice All in ai-ml-data-eng Culture & Methods * Agile * Diversity * Leadership * Lean/Kanban * Personal Growth * Scrum * Sociocracy * Software Craftmanship * Team Collaboration * Testing * UX Featured in Culture & Methods * Innovating for the Future You've Never Seen: Distributed Systems Architecture & the Grid Astrid Atkinson discusses bringing software innovation to infrastructure, and leveraging experience with reliability innovation in big tech, to transform our energy system and decarbonize the grid. Innovating for the Future You've Never Seen: Distributed Systems Architecture & the Grid All in culture-methods DevOps * Infrastructure * Continuous Delivery * Automation * Containers * Cloud * Observability Featured in DevOps * Log4Shell Response Patterns & Learnings from Them Tapabrata Pal describes three broad categories of enterprises based on their responses to Log4Shell and identifies the key characteristics of each of these patterns. Log4Shell Response Patterns & Learnings from Them All in devops EventsNew Helpful links * About InfoQ * InfoQ Editors * Write for InfoQ * About C4Media * Diversity Choose your language * En * Zhong Wen * Ri Ben * Fr [ewogICJidW] QCon New York Find real-world practical inspiration from the world's most innovative software leaders. Attend in-person. [ewogICJidW] QCon San Francisco Learn what's next in software from world-class leaders pushing the boundaries. Attend in-person or get video-only pass to recordings. [ewogICJidW] The Software Architects' Newsletter Your monthly guide to all the topics, technologies and techniques that every professional needs to know about. Subscribe for free. InfoQ Homepage News GCC 13 Supports New C2x Features, Including nullptr, Enhanced Enumerations, and More Development Building an Efficient Cloud Application Architecture (Live Webinar June 22, 2023) - Save Your Seat GCC 13 Supports New C2x Features, Including nullptr, Enhanced Enumerations, and More Like Print Bookmarks May 15, 2023 2 min read by * Sergio De Simone Write for InfoQ Join a community of experts. Increase your visibility. Grow your career.Learn more The latest release of GCC, GCC 13.1, adds support for a number of new features and improvements to the C language defined in the upcoming C2x standard, including nullptr, enhanced enumerations, auto type inference, and more. C2x is adopting a number of changes to the language that first made their appearance in C++, to make it easier for the two languages to coexist in the same codebase. Such changes include nullptr, enhanced enumerations, auto type inference, constexpr specifier, and others. The new nullptr constant will attempt to remove one of the issues with the old NULL macro, whose definition is implementation-dependent. This leads to a number of potential shortcomings when using it with type-generic macros, with conditional expression such as (true ? 0 : NULL) (since NULL could be defined as (void*)0), with vararg functions where NULL is used as a sentinel, and in other cases. To improve this, nullptr will have its own type nullptr_t; will not have a scalar value, so it cannot be used in arithmetic expressions; will be convertible to any pointer type; and will always convert to a boolean with false value. Enhanced enumerations is another change to the language that tries to fix a case of under-specification of the previous standard, in this case concerning the underlying type associated to enums. In fact, while C normally uses int for enumerations, this is not always the case, which can cause portability issues. Additionally, when ints are effectively used, this rules out the possibility of using enumerations at bitfield level. The new standard thus allows developers to state the enumeration type, as in the following example: enum a : unsigned long long { a0 = 0xFFFFFFFFFFFFFFFFULL // ^ not a constraint violation with a 64-bit unsigned long long }; C2x also tries to make it away with some restrictions to variadic functions that are considered leaky or dictated by outdated assumptions concerning their requirements on the argument list. Specifically, the new standard is going to permit that a function declaration's parameter list may just consist of an ellipsis not preceded by a named argument, e.g. int a_variadic_function(...). This change is considered safe as it does not break any existing code. Another new C feature inspired by C++ is the use of the auto keyword to leave the definition of a variable type implicit. This is possible when the definition includes an initializer from which the variable type can be derived. It is worth noting that C auto is a much more limited feature than C++ auto, which relies on C++ template type deduction rules, and can be used less generally. The introduction of constexpr in C2x responds to the goal of improving initialization of object with static storage duration, which require the use of constant expressions or macros evaluating to constant expressions. Thanks to this, the following definition, valid in C17: static size_t const bignum = 0x100000000; can be replaced by constexpr size_t bignum = 0x100000000; which has the added property of ensuring the constant is checked at compile time. Other new C2x features that are supported by GCC 13 are storage-class specifiers for compound literals, typeof and typeof_unqual, the noreturn attribute, support for empty initializer braces, removal of trigraphs and unprototyped functions, the adoption of the Unicode Identifier and Pattern Syntax, and more. C2x is the upcoming C language standard revision, expected to be approved this year, thus getting the official C23 denomination. About the Author Sergio De Simone Show moreShow less Rate this Article Adoption ( ) ( ) ( ) ( ) ( ) Style ( ) ( ) ( ) ( ) ( ) [ ] [Submit] [ ] [Submit] [ ] Author Contacted This content is in the Architecture topic Related Topics: * Development * Programming Languages * Standardization * C * System Programming * Enterprise Architecture * Architecture * Related Editorial * Related Sponsored Content * Related Sponsor [KalixLight] Easily migrate to the cloud and innovate incredibly fast with Kalix! Build high-performance microservices and APIs, NoOps needed. Learn More. Inspired by this content? Write for InfoQ. Writing for InfoQ has opened many doors and increased career opportunities for me. I was able to deeply engage with experts and thought leaders to learn more about the topics I covered. And I can also disseminate my learnings to the wider tech community and understand how the technologies are used in the real world. [8192d07] Vivian HuDevOps News Editor @InfoQ; Director of Products @Second State Write for InfoQ Inspired by this content? Write for InfoQ. I discovered InfoQ's contributor program earlier this year and have enjoyed it since then! In addition to providing me with a platform to share learning with a global community of software developers, InfoQ's peer-to-peer review system has significantly improved my writing. If you're searching for a place to share your software expertise, start contributing to InfoQ. [4105a79] Oghenevwede Emeni Articles contributor @InfoQ; Software Developer, CEO @Pact Write for InfoQ Inspired by this content? Write for InfoQ. I started writing news for the InfoQ .NET queue as a way of keeping up to date with technology, but I got so much more out of it. I met knowledgeable people, got global visibility, and improved my writing skills. [90c5fc1] Edin Kapic.NET News Editor @InfoQ; Lead Engineer @Vista, former Microsoft MVP Write for InfoQ Inspired by this content? Write for InfoQ. Becoming an editor for InfoQ was one of the best decisions of my career. It has challenged me and helped me grow in so many ways. We& apos;d love to have more people join our team. [ccccd59] Thomas BettsLead Editor, Software Architecture and Design @InfoQ; Senior Principal Engineer Write for InfoQ Could you be our next Editor-in-Chief? InfoQ seeks a full-time Editor-in-Chief to join C4Media's international, always remote team. Join us to cover the most innovative technologies of our time, collaborate with the world's brightest software practitioners, and help more than 1.6 million dev teams adopt new technologies and practices that push the boundaries of what software and teams can deliver! Apply Related Content * Relearning C++ after C++11 Relearning C++ after C++11 * Article Series: PHP 8.x Article Series: PHP 8.x * PHP 8 - Arrays, Variables, Operators, Exception Handling and More PHP 8 - Arrays, Variables, Operators, Exception Handling and More * Designing for Concurrency: the Hilbert's Hotel Problem in Go Designing for Concurrency: the Hilbert's Hotel Problem in Go * PHP 8 - Type System Improvements PHP 8 - Type System Improvements * PHP 8 - Functions and Methods PHP 8 - Functions and Methods * Colliding Communities, Cloud Native, and Telecommunications Standards Colliding Communities, Cloud Native, and Telecommunications Standards * PHP 8 - Classes and Enums PHP 8 - Classes and Enums * Java Gets a Boost with the Record Pattern, Enabling More Expressive Coding * Josh Long at Devoxx UK: Showcasing Bootiful Spring 6 and Spring Boot 3 * Magic Pocket: Dropbox's Exabyte-Scale Blob Storage System Magic Pocket: Dropbox's Exabyte-Scale Blob Storage System * Java News Roundup: JDK 21 Updates, Spring Data 2023.0, JobRunr 6.2, Micronaut 4.0 Milestones * AWS Verified Access Now GA with Support for WAF and Signed Identity Context * GitHub Overhauls Code Search Using New Search Engine * Holly Cummins at Devoxx UK: How Would the Business Benefit from Your Greener Java Application? * Open Source MongoDB Alternative FerretDB Now Generally Available * Google Previews Studio Bot, a Coding Bot for Android Development * Innovating for the Future You've Never Seen: Distributed Systems Architecture & the Grid Innovating for the Future You've Never Seen: Distributed Systems Architecture & the Grid * Reckoning with the Harm We Do: in Search of Restorative Just Culture in Software and Web Operations Reckoning with the Harm We Do: in Search of Restorative Just Culture in Software and Web Operations * Start Your Architecture Modernization with Domain-Driven Discovery Start Your Architecture Modernization with Domain-Driven Discovery * Hugging Face Releases StarCoder, the Next-Generation LLM for Seamless Code Generation * How to Improve Testing by Using a Gentle Nudge * Simplify HTTP Request Buffering with Queue-Level Routing Configuration and BufferTask API * .NET Upgrade Assistant Now Supports Azure Functions Upgrades and .NET 8 * Huawei Open Sources Kuasar, a Rust-Based Container Runtime * Upbound Releases Managed Control Plane Service * Google is Rolling out Passkeys to Make Passwords a Relic of the Past * OpenAI's Open-Source ChatGPT Plugin - Q&A with Roy Miara * Radical Transparency: How a Strong Startup Culture can Deliver Success Radical Transparency: How a Strong Startup Culture can Deliver Success * Quarkus 3.0 Released: Improving Cloud-Native Java Development with Jakarta EE 10 Support * Banking on Thousands of Microservices Banking on Thousands of Microservices * Remult, a Crud Framework for Fullstack Typescript * Kubernetes 1.27 Released with Freeze on Legacy Image Registry and In-Place Update of Pod Resources * Java News Roundup: JEPs for JDK 21, Spring Cloud AWS 3.0, OptaPlanner to Timefold * Running Large Language Models Natively on Mobile and Laptops * .NET Community Toolkit 8.2: MVVM Toolkit Attributes, Performance Enhancements, and More * Vercel Announces New Storage and Security Offerings for the Edge * From Extinct Computers to Statistical Nightmares: Adventures in Performance * Open Liberty 23.0.0.3 Unveiled: Embracing Cloud-Native Java Microservices, Jakarta EE 10 and beyond * On beyond Serverless: CALM Lessons and a New Stack for Programming the Cloud On beyond Serverless: CALM Lessons and a New Stack for Programming the Cloud The InfoQ Newsletter A round-up of last week's content on InfoQ sent out every Tuesday. Join a community of over 250,000 senior developers. View an example Enter your e-mail address [ ] [ ] Select your country [Select a country] [ ] I consent to InfoQ.com handling my data as explained in this Privacy Notice. [Subscribe] We protect your privacy. Hello stranger! You need to Register an InfoQ account or Login or login to post comments. But there's so much more behind being registered. Get the most out of the InfoQ experience. Tell us what you think [ ] [ ] Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p [ ] Email me replies to any of my messages in this thread [Post Message] Community comments Watch thread Close Your Reply Quote original message [ ] [ ] Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p [ ] Email me replies to any of my messages in this thread [Post Message] Cancel Close Your Reply [ ] [ ] Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p [ ] Email me replies to any of my messages in this thread [Post Message] Cancel Close OK Discuss * Development + GCC 13 Supports New C2x Features, Including nullptr, Enhanced Enumerations, and More + GitHub Overhauls Code Search Using New Search Engine + Relearning C++ after C++11 * Architecture & Design + From Cloud-Hosted to Cloud-Native with Rosemary Wang + Banking on Thousands of Microservices + Hien Luu on ML Principles at DoorDash * Culture & Methods + Innovating for the Future You've Never Seen: Distributed Systems Architecture & the Grid + Reckoning with the Harm We Do: in Search of Restorative Just Culture in Software and Web Operations + Hiring and Growing Great Site Reliability Engineers * AI, ML & Data Engineering + Open Source MongoDB Alternative FerretDB Now Generally Available + Hugging Face Releases StarCoder, the Next-Generation LLM for Seamless Code Generation + OpenAI's Open-Source ChatGPT Plugin - Q&A with Roy Miara * DevOps + Upbound Releases Managed Control Plane Service + Kubernetes 1.27 Released with Freeze on Legacy Image Registry and In-Place Update of Pod Resources + Log4Shell Response Patterns & Learnings from Them The InfoQ Newsletter A round-up of last week's content on InfoQ sent out every Tuesday. Join a community of over 250,000 senior developers. View an example * Get a quick overview of content published on a variety of innovator and early adopter technologies * Learn what you don't know that you don't know * Stay up to date with the latest information from the topics you are interested in Enter your e-mail address [ ] [ ] Select your country [Select a country] [ ] I consent to InfoQ.com handling my data as explained in this Privacy Notice. [Subscribe] We protect your privacy. QCon International Software Development Conference June 13-15, 2023. QCon New York International Software Conference returns this June 13-15. Technical leaders who are driving innovation and change in software will share the latest trends and techniques from their real-world projects to help you solve common challenges. Level-up on emerging software trends and get the assurance you're adopting the right patterns and practices. SAVE YOUR SPOT NOW Home Create account Login QCon Conferences Events Write for InfoQ InfoQ Editors About InfoQ About C4Media Media Kit InfoQ Developer Marketing Blog Diversity Events * QCon New York JUNE 13-15, 2023 * QCon San Francisco OCTOBER 2-6, 2023 Follow us on Youtube223K Followers Linkedin21K Followers RSS19K Readers Twitter53.4k Followers Facebook21K Likes AlexaNew Stay in the know The InfoQ PodcastThe InfoQ Podcast Engineering Culture Podcast Engineering Culture Podcast The Software Architects' NewsletterThe Software Architects' Newsletter General Feedback feedback@infoq.com Advertising sales@infoq.com Editorial editors@infoq.com Marketing marketing@infoq.com InfoQ.com and all content copyright (c) 2006-2023 C4Media Inc. Privacy Notice, Terms And Conditions, Cookie Policy BT *