Bug 24521
Summary: | void* arithmetic in string2.h for memset() | ||||||
---|---|---|---|---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Need Real Name <im14u2c> | ||||
Component: | gcc | Assignee: | Jakub Jelinek <jakub> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Aaron Brown <abrown> | ||||
Severity: | low | Docs Contact: | |||||
Priority: | low | ||||||
Version: | 6.2 | ||||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | i686 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2001-01-23 17:31:25 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Need Real Name
2001-01-21 21:59:49 UTC
Cannot reproduce it on either 6.2 with glibc-devel-2.1.3-21/egcs-1.1.2-29 nor on 7.0 with glibc-devel-2.2.1-2/gcc-2.96-71. AFAIC all void * arithmetics is done in __extension__ marked statements. Can you make sure you really have bits/string2.h from glibc-devel-2.1.3-21? Can you attach here preprocessed source? gcc -E foo.c -o foo.i Created attachment 8069 [details]
preprocessed output of "try_memset" testcase, gcc -O -E.
Ack... After filing the bug, I upgraded to "glibc-devel-2.1.3-22" in a (failed) attempt to solve the problem on my machine. (I still do have the same problem with 2.1.3-22, though.) I can't readily find "2.1.3-21" this morning, so the attached preprocessed output is from "2.1.3-22". Sorry about that. :-/ The main thing to note is that you must use "-O". I've attached the requested preprocessed output using "gcc -E foo.c -O -o foo.i". Without -O, the call to memset remains a function call. And yes, the (void*) arithmetic is in an __extension__ block. I verified that the bits/strings2.h I'm seeing is from the glibc-devel-2.1.3-22.rpm with the following commands: # rpm -q -f /usr/include/bits/string2.h glibc-devel-2.1.3-22 # rpm --verify glibc-devel-2.1.3-22 Is there something else I should try? Also, can you point me to where I can get glibc-devel-2.1.3-21 in case you need me to produce pre-processed output w/ -21? Regards, --Joe You cannot use 6.2 egcs though, this was fixed by Wed Sep 1 09:12:02 1999 Jim Kingdon <http://developer.redhat.com> * c-parse.in: save and restore warnpointerarith on __extension__ along with pedantic. * extend.texi (Alternate Keywords): Adjust documentation. patch (egcs-1.1.2-warn.patch) which appeared already in egcs-1.1.2-24 (released in Red Hat Linux 6.1). The same patch is in egcs-1.1.2-30 (RHL 6.2) and on Sep 22th, 1999 made it into CVS gcc (thus is e.g. in gcc-2.96-RH, gcc-2.97 (CVS head), it did not make it into gcc-2.95.2 though). Ok, you spotted the problem. For some reason I have "egcs-1.1.2-12". I thought I had fully upgraded this particular box to RH6.2, but I guess not. (The box has been running RH since 4.2, and I usually upgrade it every second version or so.) Thank you for your help. I apologize for the confusion. |