Opened 13 years ago

Closed 13 years ago

#3679 closed Bugs (wontfix)

Comeau throws error compiling named_param_example.cpp

Reported by: Mateusz Loskot (mloskot) <mateusz@…> Owned by: Gennadiy Rozental
Milestone: Boost 1.42.0 Component: test
Version: Boost Development Trunk Severity: Problem
Keywords: como, comeau Cc:

Description

Compiling Boost.Test examples using Comeau C/C++, I'm getting compilation error for named_param_example.cpp:

como-linux.compile.c++ ../../../bin.v2/libs/test/example/named_param_example.test/como-linux/debug/link-static/named_param_example.o
Comeau C/C++ 4.3.10.1 (May  7 2008 12:23:21) for LINUX_INTEL_ELF_Beta
Copyright 1988-2008 Comeau Computing.  All rights reserved.
MODE:non-strict warnings C++ noC++0x_extensions

"named_param_example.cpp", line 94: error: a reference of type "const char *&"
          (not const-qualified) cannot be initialized with a value of type
          "char [4]"
     foo(( name = "foo", index = 0, value = 2.5 ));
                  ^

"named_param_example.cpp", line 95: error: a reference of type "const char *&"
          (not const-qualified) cannot be initialized with a value of type
          "char [4]"
     foo(( value = 'a', index = 1, name = "foo" ));
                                          ^

"named_param_example.cpp", line 96: error: a reference of type "const char *&"
          (not const-qualified) cannot be initialized with a value of type
          "char [4]"
     foo(( name = "foo", value = "abc", index = 1 ));
                  ^

"named_param_example.cpp", line 99: error: a reference of type "const char *&"
          (not const-qualified) cannot be initialized with a value of type
          "char [4]"
         foo(( name = "foo", value = "abc" ));
                      ^

"named_param_example.cpp", line 105: error: a reference of type "const char *&"
          (not const-qualified) cannot be initialized with a value of type
          "char [4]"
     boo(( name = "boo", value = "abc" ));
                  ^

"named_param_example.cpp", line 106: error: a reference of type "const char *&"
          (not const-qualified) cannot be initialized with a value of type
          "char [4]"
     boo(( name = "boo", index = 1, value = "abc" ));
                  ^

"named_param_example.cpp", line 108: error: a reference of type "const char *&"
          (not const-qualified) cannot be initialized with a value of type
          "char [4]"
     doo(( value = 1.56, name = "ytr" ));
                                ^

7 errors detected in the compilation of "named_param_example.cpp".
  
    como -tused -c --long_long  -DBOOST_ALL_NO_LIB=1 -D_GNU_SOURCE=1 --no_inlining -O0 -g --exceptions -I"../../.."   -o "../../../bin.v2/libs/test/example/named_param_example.test/como-linux/debug/link-static/named_param_example.o" "named_param_example.cpp"

The Boost.Test library compiles and links statically well. The tests of Boost.Test library build fine as well, but not all tests pass (I'm going to report details about it soon). So, Boost.Test works well with Comeau C/C++ frontend, except the example of named parameters.

Environment:

  • OS: Linux 32-bit (Ubuntu 9.04)
  • GCC 4.3.3
  • Comeau C/C++ 4.3.10.1

Change History (1)

comment:1 by Gennadiy Rozental, 13 years ago

Resolution: wontfix
Status: newclosed

I do not have access to this compiler. Plus it's unclear to me what it's complaining about. Finally this is just an example, nt even Boost.Test's own test.

If you have patch which fixes the issue please resubmit.

Note: See TracTickets for help on using tickets.