List Info

Thread: error on size_t in 27.stringbuf.xsputn.stdcxx-515.cpp




error on size_t in 27.stringbuf.xsputn.stdcxx-515.cpp
country flaguser name
United States
2007-10-24 15:13:51
[gcc 4.1/Linux] error on size_t in
27.stringbuf.xsputn.stdcxx-515.cpp
------------------------------------------------------------
---------

                 Key: STDCXX-614
                 URL: http
s://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
            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:3
3: error: 'size_t' was not declared in this scope
$(TOPDIR)/tests/regress/27.stringbuf.xsputn.stdcxx-515.cpp:3
3: error: expected `;' before 'i'
$(TOPDIR)/tests/regress/27.stringbuf.xsputn.stdcxx-515.cpp:3
3: 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.


error on size_t in 27.stringbuf.xsputn.stdcxx-515.cpp
country flaguser name
United States
2007-10-24 15:23:50
    [ https://issues.apache.org/jira/browse/
STDCXX-614?page=com.atlassian.jira.plugin.system.issuetabpan
els:comment-tabpanel#action_12537410 ] 

Martin Sebor commented on STDCXX-614:
-------------------------------------

The same problem when compiled with HP aCC. We're probably
just missing the std:: qualification or the required
header.

aCC -c  -D_RWSTDDEBUG    -I$(TOPDIR)/include
-I$(BUILDDIR)/include -I$(TOPDIR)/tests/include  -AA  -g +d 
+DD64 +w +W392 +W655 +W684 +W818 +W819 +W849  
$(TOPDIR)/tests/regress/27.stringbuf.xsputn.stdcxx-515.cpp
Error 419:
"$(TOPDIR)/tests/regress/27.stringbuf.xsputn.stdcxx-515
.cpp", line 33 # 'size_t' is used as a type, but has
not been defined as a type.
        for (size_t i = 1; i <= 1024; ++i) {
             ^^^^^^                         
Warning (suggestion) 887:
"$(TOPDIR)/tests/regress/27.stringbuf.xsputn.stdcxx-515
.cpp", line 35 # Type 'int' is smaller than type
'unsigned long', unwanted widening in value may result.
            std::string s (i, 'a');
                           ^       
gmake: *** [27.stringbuf.xsputn.stdcxx-515.o] Error 2


> [gcc 4.1/Linux] error on size_t in
27.stringbuf.xsputn.stdcxx-515.cpp
>
------------------------------------------------------------
---------
>
>                 Key: STDCXX-614
>                 URL: http
s://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
>            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:3
3: error: 'size_t' was not declared in this scope
>
$(TOPDIR)/tests/regress/27.stringbuf.xsputn.stdcxx-515.cpp:3
3: error: expected `;' before 'i'
>
$(TOPDIR)/tests/regress/27.stringbuf.xsputn.stdcxx-515.cpp:3
3: 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.


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )