This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

gcc 2.95: Bug or Feature


Hi all,

	I recently installed gcc 2.95 form the fsirl folder at
devel.linuxppc.org, and i noticed an odd behaviour when compiling the
following piece of code:

#include <string.h>

void hsets_(long hed[128], long *entry, char *string, long strlen)
{
   strncpy(string,"#???",4);
}

(Yes, I know, the "long strlen" parameter may cause trouble).  Using the 
command "gcc -c test.c" works fine, but "gcc -O2 test.c" reports

test.c: In function `hsets_':
test.c:5: called object is not a function

Changing the parameter name removes the error.  Is this a bug or a feature?
My machine is an Apple PowerBook G3 (ppc750) running LinuxPPC 1999 (aka R5).

Thanks, Albrecht.

P.S.: as I am not a member of gc/egcs lists, please reply to the address above.
Thanks.
-- 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]