Bug 22267 - C optimization error with string.h
Summary: C optimization error with string.h
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-01 12:43 UTC by Kate Minola
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host: ia64-unknown-linux-gnu
Target: ia64-unknown-linux-gnu
Build: ia64-unknown-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kate Minola 2005-07-01 12:43:43 UTC
/* C optimization error with string.h on
 
ia64-unknown-linux-gnu
 
(also occurs on alphaev56-unknown-linux-gnu, but not on other
architectures that I have tried)
 
% gcc -v
Using built-in specs.
Target: ia64-unknown-linux-gnu
Configured with: /usr/local/gcc-4.0.0/src/gcc-4.0.0/configure
--enable-languages=c --prefix=/usr/local/gcc-4.0.0/ia64-Linux
Thread model: posix
gcc version 4.0.0
%
% gcc -O0 -c foo.c
%
% gcc -O1 -c foo.c
In file included from /usr/include/bits/string2.h:1211,
                 from /usr/include/string.h:375,
                 from foo.c:8:
/usr/include/stdlib.h:556: error: parse error before â token
/usr/include/stdlib.h:556: error: parse error before â token
%
 
Bug also occurs if use gcc-4.0-20050623 or gcc-4.1-20050625.
  
*/
 
extern void     *f_mem_malloc();
#define mem_malloc(n)           f_mem_malloc((unsigned long)(n))
#define malloc mem_malloc
 
#include <string.h>
 
int main()
{
  return(1);
}
Comment 1 Andreas Schwab 2005-07-01 12:58:24 UTC
This has nothing to do with gcc.  This is invalid C.