US · ansi.org

New from the ANSI Blog: The Current C Programming Language Standard – ISO/IEC 9899:2024 (C24)


This email was sent

Is this your brand on Milled? Claim it.

The Current C Programming Language Standard – ISO/IEC 9899:2024 (C24)

By Brad Kelechava on Dec 17, 2024 09:37 am
Abstract polygonal space in blue for C Programming.

The current standard for the programming language C is ISO/IEC 9899:2024 – Information technology – Programming languages – C.

What Is C?

Today, C is one of the most popular programming languages used worldwide for operating systems, network drivers, databases, language interpreters, and utilities, as well as a variety of other purposes.

While it originated in the 70s, the existing practices of C were unified and expanded upon in the standard ANSI X3.159-1989, or C89. Because of these origins, many people still call the C programming language standard ANSI C. However, the C standard was adopted internationally in 1990, and it has long been ISO/IEC 9899, which is developed by ISO/IEC JTC 1. The integration of C practices into an international standard sparked its association with the name ISO C.

What Is ISO/IEC 9899?

ISO/IEC 9899:2024 specifies the form and establishes the interpretation of programs written in the C programming language. As stated in its scope, it specifies:

  • The representation of C in programs
  • The syntax and constraints of the C language
  • The semantic rules for interpreting C programs
  • The representation of input data to be processed by C programs
  • The representation of output data processed by C programs
  • The restrictions and limits imposed by a conforming implementation of C

Please note, however, that ISO/IEC 9899:2024 does not specify the mechanisms by which C programs are transformed for use by a data-processing system, C programs are invoked for use by a data-processing system, input data are transformed for use by a C program, or output data are transformed after being produced by a C program. The standard also doesn’t address the size or complexity of a program and its data that will exceed the capacity of any specific data-processing system, nor does it cover all minimal requirements of a data-processing system that is capable of supporting a conforming implementation.

ISO/IEC 9899:2024 Structure

The ISO/IEC 9899:2024 document is divided into four major subdivisions:

  • preliminary elements (found in Clauses 1-4)
  • the characteristics of environments that translate and execute C programs (Clause 5)
  • the language syntax, constraints, and semantics (Clause 6)
  • the library facilities (Clause 7)

Users should note that, since ISO/IEC 9899 undergoes periodic revision, new features could be added to or withdrawn from the document. Therefore, certain uses could conflict with future editions.

Changes to ISO/IEC 9899:2024

ISO/IEC 9899:2024, or C24, is a revision of ISO/IEC 9899:2021, or C18. Numerous changes were made to this international standard, including:

  • New keywords were added, such as bool, static_assert, true, false, thread_local, and others, and implementations were allowed to provide macros for the older spelling with a leading underscore followed by a capital letter as well as defining old and new keywords as macros to enable transition of programs easily
  • Integer width constraints and obsolete sign representations (so-called “1’s complement” and “sign-magnitude”) were removed
  • One-argument version of static_assert was added
  • Support was removed for function definitions with identifier lists
  • Mandated function declarations whose parameter list is empty are now treated the same as a parameter list which only contain a single void
  • The standard was harmonized with ISO/IEC 9945 (POSIX) through extended month name formats for strftime and integration of functions: gmtime_r, localtime_r, memccpy, strdup, strndup
  • The standard was harmonized with floating-point standard ISO/IEC 60559, including integration of binary floating-point technical specification ISO/IEC TS 18661-1:2014, decimal floating-point technical specification ISO/IEC TS 18661-2:2015, floating-point types technical specification ISO/IEC TS 18661-3:2015, mathematical functions technical specification ISO/IEC TS 18661-4:2015, and new maximum and minimum functions for operations recommended in ISO/IEC 60559:2020
  • The DECIMAL_DIG macro was made obsolescent
  • Version test macros were added to library headers that contained changes to aid in upgrading and portability to be used alongside the __STDC_VERSION__ macro
  • Placement of labels was allowed in front of declarations and at the end of compound statement
  • The attributes feature was added, which includes the attributes:
    • deprecated, for marking entities as discouraged for future use
    • fallthrough, for explicitly marking cases where falling through in switches or labels is intended rather than accidental
    • maybe_unused, for marking entities which can end up not being used
    • nodiscard, for marking entities which, when used, should have their value handled in some way by a program
    • noreturn, for indicating a function shall never return
    • reproducible, for marking function types for which inputs always produce predictable output if given the same input (e.g. cached data) but for which the order of such calls still matter
    • unsequenced, for marking function types which always produce predictable output and have no dependencies upon other data (and other relevant caveats)
  • The u8 character prefix was added to match the u8 string prefix
  • All u8, u, and U strings were mandated to be UTF-8, UTF-16, and UTF-32, respectively, as defined by ISO/IEC 10646
  • Separated the literal, wide literal, and UTF-8 literal, UTF-16 literal, and UTF-32 literal encodings for strings and characters and now have a solely execution-based version of these, particularly execution and wide execution encodings
  • mbrtoc8 and c8rtomb functions missing were added
  • Compound literals now may also include storage-class specifiers as part of the type to change the lifetime of the compound literal (and possibly turn it into a constant expression)
  • The constexpr specifier for object definitions was added, and the standard improved what is recognized as a constant expression in conjunction with the constexpr storage-class specifier
  • Support was added for initialization of objects with empty braces
  • The typeof and typeof_unqual operations were added for deducing the type of an expression
  • Tag compatibility rules were improved, enabling more types to be compatible with other types
  • Bit-precise integer types _BitInt( N) and unsigned _BitInt( N) were added, where N can be an integer constant expression whose value is from one to BITINT_MAXWIDTH, inclusive
  • Rules were improved for handling enumerations without underlying types, in particular allowing for enumerations without fixed underlying type to have value representations that have a greater range than int
  • A new colon-delimited type specifier was added for enumerations to specify a fixed underlying type (and which, subject to an implementation’s definitions governing such constructs, adopt the fixed underlying type’s rules for padding, alignment, and sizing within structures and unions as well as with bit-fields)
  • A new header and a suite of bit and byte-handling utilities were added for portable access to many implementations’ most efficient functionality
  • Existing functions were modified to preserve the const-ness of the type placed into the function
  • A feature was added to embed binary data as faithfully as possible with a new preprocessor directive #embed
  • A nullptr constant and a nullptr_t type with a well-defined underlying representation identical to a pointer to void were added
  • The VA_OPT specifier was added and language was clarified in the handling of macro invocation and arguments
  • Support was mandated for variably modified types (but not variable length arrays themselves)

This list only includes roughly half of the extensive changes made to this standard. Users can find the change history of ISO/IEC 9899 in Annex M of the document.

ISO/IEC 9899:2024 – Information technology – Programming languages – C is available on the ANSI Webstore.


Read in browser »
share on Twitter Like The Current C Programming Language Standard – ISO/IEC 9899:2024 (C24) on Facebook

ASME B31.1-2024: Power Piping

By Brad Kelechava on Dec 16, 2024 01:09 pm
Worker in orange jumpsuit climbing to change power piping to ASME B31.1-2024.

What Is Power Piping?

Power piping, unsurprisingly, is found in electric power generating stations, such as industrial and institutional plants, geothermal heating systems, and central and district heating and cooling systems. This places an enormous amount of stress and pressure on the need to specify and adequately operate these systems, even beyond the stresses and pressure by which the piping intrinsically functions. These interests are reflected in the content of and changes made to ASME B31.1-2024: Power Piping, the standard for these systems.

What is ASME B31.1?

Since any failure in power piping systems not only inhibits the piping’s performance locally but can also result in numerous people losing their power, heat, and air conditioning, it is crucial that these systems adhere to code. ASME B31.1-2024 is this code. As a section of the B31, the overall American Society of Mechanical Engineers Code for Pressure Piping, ASME B31.1-2024 exists as its own document for power piping.

Specifically, it details the design, materials, fabrication, erection, test, inspection, operation, and maintenance of piping systems. Piping used with the Code includes pipe, flanges, bolting, gaskets, valves, pressure-relieving valves/devices, fittings, and the pressure-containing portions of other piping components.

Changes to ASME B31.1-2024

ASME B31.1-2024 revises the 2022 edition of the same standard code for power piping, and, as the key document for the industry, it contains numerous changes crucial for keeping the standard current. In fact, there were so many changes made to this edition that the list of updates in the beginning of the document comprises five pages. Some changes include:

  • Definitions for “designer” and “pipe” were added, definitions for “employer,” “stresses: displacement stress,” and “tube” were revised, and definition of “pipe and tube” were deleted.
  • New text added to Section 101.4, “Ambient Influences,” to note that wind need not be considered as acting concurrently with earthquakes, and vice versa.
  • Definition added for Slp, longitudinal pressure stress, in Section 104.8, “Analysis of Piping Components,” and definition of Po, pressure coincident with the occasional load being evaluated, deleted from Section 104.8.2, “Stress Due to Occasional Loads.”
  • New sentence added to Section 122.8.1, “Flammable Gas,” for the designer of hydrogen systems to refer to ASME B31.12 for further considerations.
  • New Section 125.1.2, “Heat Treatment Requirements,” was added under 125, “Creep Strength Enhanced Ferritic Materials,” 125.1, “Requirements for ASTM A217, Grade C12A and ASTM A1091, Grade C91 Castings.”
  • Sections 135.3, “Bolted Flanged Connections,” and 149, “Rerating Piping Systems,” were revised in their entirety.
  • Mandatory Appendix D, “Flexibility and Stress Intensification Factors,” was deleted.
  • New Mandatory Appendix Q, “Quality Management Program Requirements for Metallic Nonboiler External Piping-Covered Piping Systems,” was added.
  • New Mandatory Appendix R, “Documentation, Records, and Report Requirements for Metallic Nonboiler External Piping-Covered Piping Systems,” was added.

As you can see, these changes are plentiful, and they touch the many facets of power piping covered by the standard document. Users can easily find any alteration made to the ASME B31.1-2024 revision by noting the number (24) in the margin.

Get ASME B31.1-2024

ASME B31.1-2024: Power Piping is available on the ANSI Webstore.

Changes to ASME B31.1-2022

The previous iteration of the standard for power piping was also a sizable revision. Some featured changes made to the ASME B31.1-2022 revision include:

  • New definitions added for arc strike and throttle valve.
  • Definitions revised for covered piping systems (CPS) and pipe and tube.
  • New Figure 100.1.2-9, “Code Jurisdictional Limits for Piping — Steam Locomotive Boiler With Dome Throttle,” added.
  • New Figure 100.1.2-10, “Code Jurisdictional Limits for Piping — Steam Locomotive Boiler With Front-End Throttle,” added.
  • Section 104.2, which was previously “Curved Segments of Pipe,” was retitled “Curved and Mitered Segments of Pipe.”
  • In 104.3.1(c), “Branch Connections Not Requiring reinforcement,” new paragraphs added for partial penetration welded branch connections NPS 2 ( DN 50 ) and smaller under specific circumstances.
  • Figure 104.3.1-2, “Reinforced Extruded Outlets,” was revised in its entirety.
  • In Section 110, “Piping Joints,” a sentence was added regarding considering the effects of using materials with different coefficients of thermal expansion.
  • Figure 127.4.8-7, “Typical Partial Penetration Weld Branch and Instrument Connections for NPS 2 (DN 50) and Smaller Fittings,” was revised in its entirety.
  • Paragraph 129.3.6 was added for the performance of heat treatment, when required after bending or forming, for P-No. 10H materials.
  • Numerous tables were updated.

Changes to B31.1-2020

If you are interested in the major changes made to ASME B31.1-2020 from the 2018 edition, we have listed them below:

  • Either U.S. Customary (USC) or International System (SI, also known as metric) units may be used with this edition. To emphasize this, the standard contains numerous revisions to SI equivalencies in figures throughout.
  • New definitions added for ferrous material, linear indication, rounded indication, maintenance, nonferrous, postweld hydrogen bakeout, and volumetric examination.
  • New section 101.2.6 specifies for provision to be made to safely contain or relieve any expected pressure to which the piping might be subjected.
  • Design minimum temperature may establish special design requirements and material qualification requirements.
  • New sections state that consideration shall be given to how ambient temperature conditions impact the displacement stress analysis and that piping shall be designed, arranged, and supported so as to withstand reaction forces due to fluid pressure and momentum effects during normal operations and anticipated transients.
  • New section 101.9, “Reduced Ductility Effects.”
  • In-process examination is now covered.
  • New section 137.4.6 outlines special provisions for testing piping components and subassemblies, closure welds, and flanged joints.
  • New procedures were added as an alternative to hydrostatic and pneumatic testing in new section 137.1.
  • The standard now specifies that the repair of covered piping systems (CPS) is to be conducted in accordance with the ASME B31.1 code used for the original construction or to a later edition as agreed by the owner and the jurisdictional authority, if applicable.
  • New section 149 outlines rerating piping systems.
  • Figure 100.1.2-8, “Code Jurisdictional Limits for Piping — Firetube Boiler,” and Figure 104.8-1, “Equations (15 [Stress Due to Sustained Loads]), (16 [Stress Due to Occasional Loads]), and (17 [Stress Due to Displacement Load Ranges]),” were added, and several other figures were revised.

Changes to ASME B31.1-2018

For users of this standard who need to know the changes made to the 2018 edition, which revised the 2016 version, you can find them here:

  • Clarification that, where service requirements necessitate measures beyond those addressed in the code, such measures are to be specified by the engineering design.
  • New definitions for austenitizing, heat treatments, subcritical heat treatment, and heat treatments, tempering.
  • Revisions to figures for code jurisdictional limits for piping examples to better convey the information they represent.
  • New figure on “Code Jurisdictional Limits for Piping – HRSG – Desuperheater Protection Devices.”
  • Revised equation for the minimum wall thickness of straight pipe under internal pressure (including seamless, longitudinal welded, or spiral welded and operating below the creep range). In the section featuring this equation, nomenclature has also been alphabetized and W, the weld strength reduction factor, has been added.
  • Removed section 104.1.4 from ASME B31.1-2016, which covered equations specific to longitudinal-welded or spiral-welded pipe operating in the creep range.
  • Updates to the equation to stress due to occasional loads, which now includes the defined term Po representing the pressure coincident with the occasional load being evaluated in psi (kPa).
  • Inclusion of carbon-molybdenum steel in the list of steels in the carbide phase that may be converted to graphite upon prolonged exposure to high temperatures.
  • New subparagraph in the steel section discussing how carbon and low alloy steels can be susceptible to flow-accelerated corrosion (FAC) under certain conditions.
  • Inclusion of nickel alloys in the calculations for the forming strains of cold-formed areas of components.
  • Substantial updates to the section covering inspection and qualification of authorized inspectors for boiler external piping.
  • Removed Mandatory Appendix J, “Quality Control Requirements for Boiler External Piping (BEP)” from ASME B31.1-2016.
  • New figure displaying the winding angle of filament-wound thermosetting resin pipe.
  • New Mandatory Appendix O, “Use of Alternative Ultrasonic Acceptance Criteria.”
  • New Mandatory Appendix P, “Metallic Bellows Expansion Joints.”
  • Removed Nonmandatory Appendix VI, “Approval of New Materials.”

Read in browser »
share on Twitter Like ASME B31.1-2024: Power Piping on Facebook




Recent Articles:

Minimizing Workplace Injuries: The Ergonomic Edge in Conveyor Design
NECA 100-2024: Symbols for Electrical Construction Drawings
ANSI B11.26-2024: Machines – Functional Safety
NECA 1-2023: Good Workmanship in Electrical Construction
UL 588 Ed. 19-2015: Holiday Decorative Products
Share
Tweet
Forward
     

Thanks for Subscribing

The team at ANSI wants to extend a hearty 'thank you' to all of our wonderful readers.

     
View this email in your browser






This email was sent to -
why did I get this?    unsubscribe from this list    update subscription preferences
ANSI · 25 W 43RD ST FL 4 · NEW YORK, NY 10036 · USA

Are you sure?

Lists help you organize the brands that you care about. Your lists are private to you.