This is the mail archive of the
mailing list for the glibc project.
[Bug string/20736] New: string2.h strcmp macro gratuitously adds __builtin_
- From: "acsawdey at gcc dot gnu.org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Tue, 25 Oct 2016 19:14:00 +0000
- Subject: [Bug string/20736] New: string2.h strcmp macro gratuitously adds __builtin_
- Auto-submitted: auto-generated
Bug ID: 20736
Summary: string2.h strcmp macro gratuitously adds __builtin_
Assignee: unassigned at sourceware dot org
Reporter: acsawdey at gcc dot gnu.org
CC: sjmunroe at us dot ibm.com
Target Milestone: ---
In string/bits/string2.h the macro defined for strcmp(s1, s2) expands to calls
to __builtin_strcmp. The analogous macro for strncmp expands to calls to
This becomes an issue if the user specifies -fno-builtin-strcmp to gcc which
now does not work because the macro has transformed strcmp to __builtin_strcmp.
The behavior with gcc is as expected with strncmp and also (for example)
Actually since strncmp calls strcmp instead if one arg is a const string
shorter than n, in that case the user's attempt to disable builtin expansion
will also not work.
If strcmp expanded in terms of strcmp not __builtin_strcmp, this could be
You are receiving this mail because:
You are on the CC list for the bug.