Skip to content

[CODE HEALTH] Qualify C library calls with std:: after modernize-deprecated-headers #4354

Closed

Description

@om7057

Follow-up to #4348 / #4349.

Switching deprecated C headers to their C++ equivalents (stdlib.h -> cstdlib, string.h -> cstring, etc.) leaves the actual library calls unqualified (e.g. memcpy(...) instead of std::memcpy(...)). Both forms compile today since most implementations still expose these names in the global namespace, but only the std:: form is guaranteed by the standard.

This ticket tracks adding std:: to those unqualified calls where feasible, per direction from #4349.

Priority list:

From <cstring>: memcpy, memmove, memset, memcmp, strlen, strcmp, strncmp, strchr, strrchr, strstr, strncpy, strncat, strtok, strerror

From <cctype>: isalnum, isalpha, isdigit, isspace, tolower, toupper, ...

From <cstdlib>: strtol, strtoll, strtoul, strtod, malloc/free, qsort, bsearch, abs/labs/llabs, getenv, abort, exit

From <cstdio>: snprintf, vsnprintf, fopen, fclose, fprintf, fscanf, printf, FILE

From <ctime>: time, gmtime, localtime, strftime, mktime, tm

As with the header migration, this should probably land as one or more directory-scoped PRs rather than a single repo-wide change.

Activity

  1. added
    needs-triage
    on Aug 4, 2026
  2. added a commit that references this issue on Aug 4, 2026
    c382d34
  3. added
    triage/accepted
    and removed
    needs-triage
    on Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    triage/accepted

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions