You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by "Martin Sebor (JIRA)" <ji...@apache.org> on 2007/10/24 22:23:50 UTC

[jira] Commented: (STDCXX-614) [gcc 4.1/Linux] error on size_t in 27.stringbuf.xsputn.stdcxx-515.cpp

    [ https://issues.apache.org/jira/browse/STDCXX-614?page=com.atlassian.jira.plugin.system.issuetabpanels: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: 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
>            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.