Get the latest tech news
Make C string literals const?
Martin Uecker has started a new initiative to ensure a better const contract for C2y: change the type of string literals to a const-qualified base type, much as it is already the case in C++. Compi…
Compilers support this since a very long time; some of them have this as default, some provide command line switches for that model. So, before doing this and writing papers, it would be good if we had an idea of the impact of such a change in existing code bases. You have a project and you tested it with such options, but introducing this permanently into your code base would be a real pain.
Or read this on Hacker News