From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 407043871029; Mon, 16 Mar 2020 19:34:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 407043871029 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1584387255; bh=0JqXRT+FErwZx0nrA+9m4svlSA3QCYFUqiRtmSyDP+s=; h=From:To:Subject:Date:In-Reply-To:References:From; b=qXu8kh4pnIl75gsVZEDsj5u7DgZhCyE4RxEjiowYGDKN9gchd4jtn1hMa5WYjHleA hZGotwF1WcSsvEP9nZDAO0NR8/+B+e1yAlfziFK+Jm4jc1tO6wNnu+F89hem3rfn5E /MNBJ8ENCKrcgbpwDp7zLpkY/9nX8F8I+ZCTsUKY= From: "msebor at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/94169] warn for modifying getenv() result Date: Mon, 16 Mar 2020 19:34:15 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: enhancement X-Bugzilla-Who: msebor at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Mar 2020 19:34:15 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94169 --- Comment #2 from Martin Sebor --- Other C standard functions that return a pointer to an unmodifiable object: localeconv(), setlocale(), strerror() In addition, stdin, stdout, and stderr could be marked as pointing to read-= only (although uses by standard library macros would have to be exempted). and POSIX: ctermid() dlerror() getgrent() gethostent() getnetbyaddr(), getnetbyname(), getnetent() getprotbyname(), getprotbynumber(), getprotent() getpwent(), getpwnam(), getpwuid(), getservbyname(), getservbyport(), getservent() getutxent(), getutxid(), getutxline() getgrid(), getgrnam(), getlogin() getsubopt() (object pointed to by second argument) nl_langinfo() ptsname() readdir() strsignal() ttyname()=