[jira] Commented: (STDCXX-195) [Linux] error on std::putc()

2008-01-03 Thread Martin Sebor (JIRA)

[ 
https://issues.apache.org/jira/browse/STDCXX-195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12555762#action_12555762
 ] 

Martin Sebor commented on STDCXX-195:
-

Same problem with getc():

$ cat t.cpp && make t
#include 

int main()
{
std::putc ('x', stdout);
std::getc (stdin);
} 
gcc -c -I/home/sebor/stdcxx/include/ansi -D_RWSTDDEBUG   -pthread 
-I/home/sebor/stdcxx/include -I/build/sebor/stdcxx-gcc-4.1.2-15D/include 
-I/home/sebor/stdcxx/examples/include  -pedantic -nostdinc++ -g   -W -Wall 
-Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long -Wcast-align   
t.cpp
t.cpp: In function 'int main()':
t.cpp:5: error: '_IO_putc' is not a member of 'std'
t.cpp:6: error: '_IO_getc' is not a member of 'std'
make: *** [t.o] Error 1


> [Linux] error on std::putc()
> 
>
> Key: STDCXX-195
> URL: https://issues.apache.org/jira/browse/STDCXX-195
> Project: C++ Standard Library
>  Issue Type: Bug
>  Components: 27. Input/Output
>Affects Versions: 4.1.3
> Environment: SuSE SLES 9sp2 (ppc64), IBM XL C/C++ Advanced Edition 
> V8.0 for Linux   
> Version: 08.00..
>Reporter: Scott (Yu) Zhong
>Assignee: Martin Sebor
> Fix For: 4.2.1
>
>
> IBM VAC++ 8.0 linux uses _IO_putc instead of putc
> file affected:
> include/ansi/cstdio
> --- testcase.cpp 
> #include 
> int main()
> {
>   std::putc ("test", stdout);
> std::fflush (stdout);
> }
> -- compile line 
> xlc -F /package/1/ppc64/compilers/ibm/va80/vac.cfg -q64 -qarch=ppc64 
> -D_RWSTD_NO_IMPLICIT_INCLUSION -qnolib -Wl,-dynamic-linker 
> -Wl,/lib64/ld64.so.1  -D_RWCONFIG=stdlib_rs -I../../include 
> -I./../../../../include -I./../../../../include/ansi -I./../../../.. -I.. -I. 
> -g -c ../testcase.cpp
> -- output --
> "../testcase.cpp", line 5.9: 1540-0130 (S) "std::_IO_putc" is not declared.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (STDCXX-195) [Linux] error on std::putc()

2006-06-05 Thread Martin Sebor (JIRA)
[ 
http://issues.apache.org/jira/browse/STDCXX-195?page=comments#action_12414838 ] 

Martin Sebor commented on STDCXX-195:
-

The problem here is that putc is #defined as a macro by the C library. This is 
explicitly disallowed by lib.headers, p6 (clarified by Footnote 166):

  -6- Names that are defined as functions in C shall be defined as functions in 
the C++ Standard Library.166)
  ___
  Footnote 166) This disallows the practice, allowed in C, of providing a 
"masking macro" in addition to the function prototype. The only way to achieve 
equivalent "inline" behavior in C++ is to provide a definition as an extern 
inline function.

> [Linux] error on std::putc()
> 
>
>  Key: STDCXX-195
>  URL: http://issues.apache.org/jira/browse/STDCXX-195
>  Project: C++ Standard Library
> Type: Bug

>   Components: 27. Input/Output
> Versions: 4.1.3
>  Environment: SuSE SLES 9sp2 (ppc64), IBM XL C/C++ Advanced Edition V8.0 for 
> Linux   
> Version: 08.00..
> Reporter: Scott (Yu) Zhong
> Assignee: Martin Sebor

>
> IBM VAC++ 8.0 linux uses _IO_putc instead of putc
> file affected:
> include/ansi/cstdio
> --- testcase.cpp 
> #include 
> int main()
> {
>   std::putc ("test", stdout);
> std::fflush (stdout);
> }
> -- compile line 
> xlc -F /package/1/ppc64/compilers/ibm/va80/vac.cfg -q64 -qarch=ppc64 
> -D_RWSTD_NO_IMPLICIT_INCLUSION -qnolib -Wl,-dynamic-linker 
> -Wl,/lib64/ld64.so.1  -D_RWCONFIG=stdlib_rs -I../../include 
> -I./../../../../include -I./../../../../include/ansi -I./../../../.. -I.. -I. 
> -g -c ../testcase.cpp
> -- output --
> "../testcase.cpp", line 5.9: 1540-0130 (S) "std::_IO_putc" is not declared.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira