Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.std.c > #6150

Re: Return pointers-to-const where data shall not be modified

From Philipp Klaus Krause <pkk@spth.de>
Newsgroups comp.std.c
Subject Re: Return pointers-to-const where data shall not be modified
Date 2020-08-28 11:40 +0200
Organization solani.org
Message-ID <riajet$mn8$1@solani.org> (permalink)
References <r8urv8$82c$1@solani.org> <87tv0szuj7.fsf@nosuchdomain.example.com> <04b46dc3-f655-4292-823c-60b04b881425n@googlegroups.com>

Show all headers | View raw


Am 19.08.20 um 19:44 schrieb Chris Peterson:
> 
> Would limiting the const function prototypes to C2x code (gcc -std=c2x) address this concern about backwards compatibility? Old code that wants the non-const function prototypes can ask for an older C version (e.g. gcc -std=c18).

That wouldbe done anyway. Changes in the stdandard do not apply
retroactively (from an ISO perspective, the new stadard replaces the old
one, so no statements about older standards are made).

But people (the Austin group, i.e. the POSIX comittee) want to be able
to compile old code in C2X mode and not see any new diagnostics.

Philipp

Back to comp.std.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Return pointers-to-const where data shall not be modified Philipp Klaus Krause <pkk@spth.de> - 2020-05-06 19:25 +0200
  Re: Return pointers-to-const where data shall not be modified Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-05-06 13:18 -0700
    Re: Return pointers-to-const where data shall not be modified Chris Peterson <cpeterson@mozilla.com> - 2020-08-19 10:44 -0700
      Re: Return pointers-to-const where data shall not be modified Philipp Klaus Krause <pkk@spth.de> - 2020-08-28 11:40 +0200
      Re: Return pointers-to-const where data shall not be modified James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-08-28 08:42 -0400

csiph-web