Skip to content

[diff.iso] Some examples are out date in C23 #9266

Description

@Halalaluyafail3

The following is a list of all of the out of date instances that I have found:

  • [diff.dcl]/7 C23 has removed unprototyped functions.
  • [diff.dcl]/9 C23 has removed old-style function definitions.
  • [diff.lex]/3 C23 has required that different encoding prefixes cannot be mixed. Also, C17 made combinations such as u8"" and L"" invalid.

As an aside, the following looks to be out of date too [diff.dcl]/10.2:

In C++, designators for non-static data members must be specified in declaration order, designators for array elements and nested designators are not supported, and designated and non-designated initializers cannot be mixed in the same initializer list.

The last part of this sentence appears to be incorrect with P2287, if "initializer list" is taken to have the C meaning (C++ does not describe designated initializers as being part of an initializer list). Though because this only applies to base classes this cannot actually be used by C code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions