[all-commits] [llvm/llvm-project] 1cbd25: [NFC][libc] Clarifies underscores in n-char-sequen...

Mark de Wever via All-commits all-commits at lists.llvm.org
Mon Aug 12 09:59:45 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1cbd25f882d10de1a23bb0287a70cde5037ebf42
      https://github.com/llvm/llvm-project/commit/1cbd25f882d10de1a23bb0287a70cde5037ebf42
  Author: Mark de Wever <koraq at xs4all.nl>
  Date:   2024-08-12 (Mon, 12 Aug 2024)

  Changed paths:
    M libc/src/__support/str_to_float.h
    M libc/test/src/stdlib/strtof_test.cpp

  Log Message:
  -----------
  [NFC][libc] Clarifies underscores in n-char-sequence. (#102193)

The C standard specifies
  n-char-sequence:
    digit
    nondigit
    n-char-sequence digit
    n-char-sequence nondigit

nondigit is specified as one of:
  _ a b c d e f g h i j k l m
    n o p q r s t u v w x y z
    A B C D E F G H I J K L M
    N O P Q R S T U V W X Y Z

This means nondigit includes the underscore character. This patch
clarifies this status in the comments and the test.

Note C17 specifies n-char-sequence for NaN() as optional, and an empty
sequence is not a valid n-char-sequence. However the current comment has
the same effect as using the pedantic wording. So I left that part
unchanged.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list