From nobody Sat Jan 07 23:26:34 2023 X-Original-To: standards@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NqGYl1Wlsz2pQTY for ; Sat, 7 Jan 2023 23:26:35 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NqGYk6g9Mz43hX for ; Sat, 7 Jan 2023 23:26:34 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673133994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=boRPGwWq55Jm/Bl0w4AvB1BUYbiDDVsPXxE18aW8yjo=; b=QSpCadWq+ZoBy0oJqHXLhqkb/nx4prZyXEndMk/lLoxrUwBhiNUNeQ72bKBrSv4uaf1b/i //k2Vr1QICHjrzdQbzTFuyZw2l8/VPiAXdLJyYWfFDeHR8lfUXhrReFmwa5w824FnASC/d KWGS1Ib+w+PkztvveHft9/z/9CRnZsHlGc7rqRz+l5dX74E9G4mwZ221/YyyCpv1kK3wop R4K2LJVzgifBw5kbSw6Cy0mfXkNKeS1jzHHuCxDUeDbzYCeNlD7I2z1f2z9RIGlqRWqxkC c9Eoy96oQNVc5uzXzRQeOnrzdzw5e7FAVSwFfA8qPHLtZQEgP7aLq+p29mIgFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673133994; a=rsa-sha256; cv=none; b=nWM52vVsNS0ZvXnaxEyZ0bFdSIYYX9ON96s80sn2DGLuKhiHQLyx9jIpPxvyW/H2Z8L1s8 NHYnj+ByS+skjtO7BL26uwFcCJ29vtcXe5vaFDtaYSQJfWqPfzKl1+RDBXOjquLrLlTAXx F9oJDADcpCNXaNcVqZo8eS8sqorPi/NA4DFJTeP+G7iU0UBRj74q4sHm3kbsxWRUP3JIt9 BZnssQEt0VDQHxeO3q+uEjmgaywNaRoS6w0NaXi3ASEZv/7x+h2xmaOPisK4V0I0gFEL52 ciGUuTyjXAAl6q23/osu92aIMYqM3qRi3+p2Wbezy2BTKNCB6hdAC8yebo3i9g== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NqGYk5fHNzRx0 for ; Sat, 7 Jan 2023 23:26:34 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 307NQYYi066420 for ; Sat, 7 Jan 2023 23:26:34 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 307NQYnT066419 for standards@FreeBSD.org; Sat, 7 Jan 2023 23:26:34 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: standards@FreeBSD.org Subject: [Bug 268820] index C++ variable overloading Date: Sat, 07 Jan 2023 23:26:34 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: 13.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: marklmi26-fbsd@yahoo.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: standards@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Standards compliance List-Archive: https://lists.freebsd.org/archives/freebsd-standards List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-standards@freebsd.org X-BeenThere: freebsd-standards@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D268820 Mark Millard changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marklmi26-fbsd@yahoo.com --- Comment #1 from Mark Millard --- FYI: The specific error report is: # c++ string_index_use.cpp=20 string_index_use.cpp:3:13: error: redefinition of 'index' as different kind= of symbol std::string index; ^ /usr/include/strings.h:62:7: note: previous definition is here char *index(const char *, int) __pure; /* LEGACY */ ^ 1 error generated. for: # more string_index_use.cpp #include std::string index; int main() { } I get the same for stable/13 and main [so: 14]. For reference, for the __BEGIN_DECLS related use in strings.h : # grep -r "define.*__BEGIN_DECLS" /usr/include/ /usr/include/sys/cdefs.h:#define __BEGIN_DECLS extern "C" { /usr/include/sys/cdefs.h:#define __BEGIN_DECLS and the code block is: #if defined(__cplusplus) #define __BEGIN_DECLS extern "C" { #define __END_DECLS } #else #define __BEGIN_DECLS #define __END_DECLS #endif The strings.h is used via /usr/include/string.h by the text: . . . #include #include #include /* * Prototype functions which were historically defined in , but * are required by POSIX to be prototyped in . */ #if __BSD_VISIBLE #include #endif . . . So __BSD_VISIBLE in involved in causing the extra definition of index. --=20 You are receiving this mail because: You are the assignee for the bug.=