Hasty Briefsbeta

Bilingual

Make C string literals const?

a year ago
  • #C programming
  • #compiler
  • #string literals
  • Martin Uecker proposes changing the type of string literals to a const-qualified base type in C, similar to C++.
  • Compilers already support this, either by default or via command-line switches.
  • This change would be normative and might impact existing code, so feedback is sought.
  • Feedback requested includes experiences with projects already using const-qualified string literals, ease of adoption, or potential difficulties.
  • The goal is to gather facts, not opinions, with specific requests for project details and experiences.
  • Open-source projects should provide pointers; commercial projects should describe without sharing confidential information.
  • Reports should focus on actual experiences with const qualification options, not speculation.