Bug 8450

Summary: egcs won't compile string.h with -O4
Product: [Retired] Red Hat Linux Reporter: Paul Springer <pls>
Component: egcsAssignee: Nalin Dahyabhai <nalin>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0CC: pls
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-01-13 22:27:09 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:

Description Paul Springer 2000-01-13 18:59:14 UTC
When "#include <string.h>" is inside main(), egcs reports errors if the -O4
flag is set.  Example:  cc -O4 -c stringbug.c reports errors, where
stringbug.c is the following:

main()
{
#include <string.h>
char    *a = "hello";
char    b[100];

strcpy( a, b );
}

Comment 1 Jim Kingdon 2000-01-13 22:27:59 UTC
I can reproduce this with 6.1.  However, I'm not sure I have much
of a reaction beyond "well, include string.h from outside a function".
You could see if you get a better reception on the GCC mailing lists
at http://gcc.gnu.org/