From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 82BD6393C038; Thu, 8 Apr 2021 09:44:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 82BD6393C038 From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug gdb/27681] FAIL: gdb.base/help.exp: apropos \(print[^[ bsiedf\".-]\) (timeout) Date: Thu, 08 Apr 2021 09:44:20 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot 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://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2021 09:44:20 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27681 --- Comment #21 from Tom de Vries --- (In reply to Michael Matz from comment #18) > The types are simply incompatible: >=20 > extern int regcomp (regex_t *_Restrict_ __preg, > const char *_Restrict_ __pattern, > int __cflags); > ... > extern regoff_t re_search (struct re_pattern_buffer *__buffer, > const char *__String, regoff_t __length, > regoff_t __start, regoff_t __range, > struct re_registers *__regs); >=20 > regex_t !=3D struct re_pattern_buffer. In the GNU implementation they ar= e a > typedef > of each other=20 Right, and that typedef in a user-interfacing header file was precisely the reason it looked obvious to me that the types were compatible. So thanks f= or making a detailed argument, now I understand the difference in interpretati= on. > (which is why there are no warnings :-/ ). Yeah, if these types were designed to be incompatible, the implementation h= as a certain invitation-to-shoot-yourself-in-the-foot quality about it. > But conceptually > it's two opaque (and different) types Agreed, that could be a valid point that I overlooked. If so, the incompatibility might deserve a mention at the typedef, especially since th= ere is at least one function (regfree) that does exploit that typedef. Anyway, after finding this ( https://www.gnu.org/software/gnulib/manual/html_node/GNU-Regex-Functions.ht= ml#GNU-Regex-Functions ) it seems that this is the documentation I've been looking for. It lists a set of functions that can be used together. There's only one function from= the posix interface explicitly listed: regfree. This corroborates your point t= hat the types are meant to be incompatible. --=20 You are receiving this mail because: You are on the CC list for the bug.=