[ 
https://issues.apache.org/jira/browse/STDCXX-614?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Travis Vitek updated STDCXX-614:
--------------------------------

    Patch Info: [Patch Available]

2007-10-29  Travis Vitek  <[EMAIL PROTECTED]>

        STDCXX-614
        * 27.stringbuf.xsputn.stdcxx-515.cpp (main): Include header
        and add namespace qualifier as required to compile.

Index: 27.stringbuf.xsputn.stdcxx-515.cpp
===================================================================
--- 27.stringbuf.xsputn.stdcxx-515.cpp   (revision 589749)
+++ 27.stringbuf.xsputn.stdcxx-515.cpp   (working copy)
@@ -27,10 +27,11 @@
 #include <sstream>  // for stringstream
 #include <string>   // for string
 #include <cassert>  // for assert()
+#include <cstddef>  // for size_t
 
 int main ()
 {
-    for (size_t i = 1; i <= 1024; ++i) {
+    for (std::size_t i = 1; i <= 1024; ++i) {
         std::stringstream strm;
         std::string s (i, 'a');
         strm << s;


> [gcc 4.1/Linux] error on size_t in 27.stringbuf.xsputn.stdcxx-515.cpp
> ---------------------------------------------------------------------
>
>                 Key: STDCXX-614
>                 URL: https://issues.apache.org/jira/browse/STDCXX-614
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: Tests
>    Affects Versions: 4.2
>         Environment: gcc 4.1.1 on Red Hat Enterprise Linux Server release 5 
> (Tikanga)
>            Reporter: Martin Sebor
>            Assignee: Travis Vitek
>            Priority: Minor
>             Fix For: 4.2.1
>
>
> The 27.stringbuf.xsputn.stdcxx-515.cpp fails to compile with gcc 4.1.1 on  
> Red Hat Enterprise Linux Server release 5 with the error below:
> gcc -c -I$(TOPDIR)/include/ansi -D_RWSTDDEBUG    -I$(TOPDIR)/include 
> -I$(BUILDDIR)/include -I$(TOPDIR)/tests/include  -pedantic -nostdinc++ -g   
> -W -Wall -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long 
> -Wcast-align   $(TOPDIR)/tests/regress/27.stringbuf.xsputn.stdcxx-515.cpp
> $(TOPDIR)/tests/regress/27.stringbuf.xsputn.stdcxx-515.cpp: In function 'int 
> main()':
> $(TOPDIR)/tests/regress/27.stringbuf.xsputn.stdcxx-515.cpp:33: error: 
> 'size_t' was not declared in this scope
> $(TOPDIR)/tests/regress/27.stringbuf.xsputn.stdcxx-515.cpp:33: error: 
> expected `;' before 'i'
> $(TOPDIR)/tests/regress/27.stringbuf.xsputn.stdcxx-515.cpp:33: error: 'i' was 
> not declared in this scope
> gmake: *** [27.stringbuf.xsputn.stdcxx-515.o] Error 1

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

Reply via email to