------- Additional Comments From darcypj at us dot ibm dot com  2004-12-07 
15:21 -------
Wow - curiously, I don't have a problem with it, but that is because when I
added the -fexec-charset option, I no longer got the branch to puts().

Examples follow:

===================================
If I compile with the following options, I see the puts:

-c print.c -fverbose-asm -Wa,-aldhs=print.lst -gdwarf-2

   4:print.c       ****   printf("Hello world\n");
  47                            .loc 1 4 0
  48 001c C0200000              larl    %r2,.LC0        #,
  48      0000
  49 0022 C0E50000              brasl   %r14,puts       #,
  49      0000


=======================
And with these options (just the -fexec-charset addded) I see a call to 
printf().

-c print.c -fverbose-asm -Wa,-aldhs=print.lst -gdwarf-2 -fexec-charset=IBM1047

   4:print.c       ****   printf("Hello world\n");
  47                            .loc 1 4 0
  48 001c C0200000              larl    %r2,.LC0        #,
  48      0000
  49 0022 C0E50000              brasl   %r14,printf     #,
  49      0000


Note, I get this warning either way since I am not including any headers, in
order to try and force the builtin printf()..

print.c: In function 'main':
print.c:4: warning: incompatible implicit declaration of built-in function 
'printf'

So it appears to me that the compiler builtin knows not to activate when the
-fexec-charset is invoked?

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18785

Reply via email to