You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Ralf Henschkowski (JIRA)" <tu...@ws.apache.org> on 2007/09/13 10:04:32 UTC
[jira] Created: (TUSCANY-1695) SDOUtils.cpp does not compile due to
problematic cast
SDOUtils.cpp does not compile due to problematic cast
-----------------------------------------------------
Key: TUSCANY-1695
URL: https://issues.apache.org/jira/browse/TUSCANY-1695
Project: Tuscany
Issue Type: Bug
Components: C++ Build
Affects Versions: Cpp-Next
Environment: Linux Fedora Core 2.6.21-1.3194.fc7
g++ (GCC) 4.1.2 20070502 (Red Hat 4.1.2-12)
Reporter: Ralf Henschkowski
compiler sees ambiguitiy in the following line:
===================================================================
--- sdo/runtime/core/src/commonj/sdo/SDOUtils.cpp (revision 575198)
+++ sdo/runtime/core/src/commonj/sdo/SDOUtils.cpp (working copy)
@@ -275,7 +275,7 @@
j != pl.end();
j++)
{
- PropertyPtr current = *j;
+ PropertyPtr current = (PropertyPtr)*j;
out << "\tProperty: "
<< current->getName()
Explicit cast helped to compile it, but I'm not sure if it is a fix ...
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org
[jira] Commented: (TUSCANY-1695) SDOUtils.cpp does not compile due
to problematic cast
Posted by "Brady Johnson (JIRA)" <tu...@ws.apache.org>.
[ https://issues.apache.org/jira/browse/TUSCANY-1695?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12528935 ]
Brady Johnson commented on TUSCANY-1695:
----------------------------------------
I commit the patch recommended by Michael Yoder.
--------------------
Brady Johnson
Lead Software Developer - HydraSCA
Rogue Wave Software - brady.johnson@roguewave.com
> SDOUtils.cpp does not compile due to problematic cast
> -----------------------------------------------------
>
> Key: TUSCANY-1695
> URL: https://issues.apache.org/jira/browse/TUSCANY-1695
> Project: Tuscany
> Issue Type: Bug
> Components: C++ Build
> Affects Versions: Cpp-Next
> Environment: Linux Fedora Core 2.6.21-1.3194.fc7
> g++ (GCC) 4.1.2 20070502 (Red Hat 4.1.2-12)
> Reporter: Ralf Henschkowski
> Fix For: Cpp-Next
>
>
> compiler sees ambiguitiy in the following line:
> ===================================================================
> --- sdo/runtime/core/src/commonj/sdo/SDOUtils.cpp (revision 575198)
> +++ sdo/runtime/core/src/commonj/sdo/SDOUtils.cpp (working copy)
> @@ -275,7 +275,7 @@
> j != pl.end();
> j++)
> {
> - PropertyPtr current = *j;
> + PropertyPtr current = (PropertyPtr)*j;
> out << "\tProperty: "
> << current->getName()
> Explicit cast helped to compile it, but I'm not sure if it is a fix ...
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org
[jira] Resolved: (TUSCANY-1695) SDOUtils.cpp does not compile due
to problematic cast
Posted by "Adriano Crestani (JIRA)" <tu...@ws.apache.org>.
[ https://issues.apache.org/jira/browse/TUSCANY-1695?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Adriano Crestani resolved TUSCANY-1695.
---------------------------------------
Resolution: Fixed
> SDOUtils.cpp does not compile due to problematic cast
> -----------------------------------------------------
>
> Key: TUSCANY-1695
> URL: https://issues.apache.org/jira/browse/TUSCANY-1695
> Project: Tuscany
> Issue Type: Bug
> Components: C++ Build
> Affects Versions: Cpp-Next
> Environment: Linux Fedora Core 2.6.21-1.3194.fc7
> g++ (GCC) 4.1.2 20070502 (Red Hat 4.1.2-12)
> Reporter: Ralf Henschkowski
> Fix For: Cpp-Next
>
>
> compiler sees ambiguitiy in the following line:
> ===================================================================
> --- sdo/runtime/core/src/commonj/sdo/SDOUtils.cpp (revision 575198)
> +++ sdo/runtime/core/src/commonj/sdo/SDOUtils.cpp (working copy)
> @@ -275,7 +275,7 @@
> j != pl.end();
> j++)
> {
> - PropertyPtr current = *j;
> + PropertyPtr current = (PropertyPtr)*j;
> out << "\tProperty: "
> << current->getName()
> Explicit cast helped to compile it, but I'm not sure if it is a fix ...
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org
[jira] Commented: (TUSCANY-1695) SDOUtils.cpp does not compile due
to problematic cast
Posted by "Michael Yoder (JIRA)" <tu...@ws.apache.org>.
[ https://issues.apache.org/jira/browse/TUSCANY-1695?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12528418 ]
Michael Yoder commented on TUSCANY-1695:
----------------------------------------
This seem like a bug in the compiler. ;-) The dereferenced iterator here is a smart pointer, and can't be cast directly. RefCountingPointer.h has helper functions for casting smart pointers. A more correct fix would be:
- PropertyPtr current = *j;
+ PropertyPtr current = staticCast<PropertyPtr>(*j);
> SDOUtils.cpp does not compile due to problematic cast
> -----------------------------------------------------
>
> Key: TUSCANY-1695
> URL: https://issues.apache.org/jira/browse/TUSCANY-1695
> Project: Tuscany
> Issue Type: Bug
> Components: C++ Build
> Affects Versions: Cpp-Next
> Environment: Linux Fedora Core 2.6.21-1.3194.fc7
> g++ (GCC) 4.1.2 20070502 (Red Hat 4.1.2-12)
> Reporter: Ralf Henschkowski
> Fix For: Cpp-Next
>
>
> compiler sees ambiguitiy in the following line:
> ===================================================================
> --- sdo/runtime/core/src/commonj/sdo/SDOUtils.cpp (revision 575198)
> +++ sdo/runtime/core/src/commonj/sdo/SDOUtils.cpp (working copy)
> @@ -275,7 +275,7 @@
> j != pl.end();
> j++)
> {
> - PropertyPtr current = *j;
> + PropertyPtr current = (PropertyPtr)*j;
> out << "\tProperty: "
> << current->getName()
> Explicit cast helped to compile it, but I'm not sure if it is a fix ...
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org
[jira] Commented: (TUSCANY-1695) SDOUtils.cpp does not compile due
to problematic cast
Posted by "Ralf Henschkowski (JIRA)" <tu...@ws.apache.org>.
[ https://issues.apache.org/jira/browse/TUSCANY-1695?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12527011 ]
Ralf Henschkowski commented on TUSCANY-1695:
--------------------------------------------
The actual error message was:
make[5]: Entering directory `/home/hensch/tuscany/cpp/sdo/runtime/core/src/commonj/sdo'
/bin/sh ../../../../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../../../.. -I../../../../../runtime/core/src -I/usr/include/libxml2 -g -O2 -MT SDOUtils.lo -MD -MP -MF .deps/SDOUtils.Tpo -c -o SDOUtils.lo SDOUtils.cpp
g++ -DHAVE_CONFIG_H -I. -I../../../../.. -I../../../../../runtime/core/src -I/usr/include/libxml2 -g -O2 -MT SDOUtils.lo -MD -MP -MF .deps/SDOUtils.Tpo -c SDOUtils.cpp -fPIC -DPIC -o .libs/SDOUtils.o
SDOUtils.cpp: In static member function 'static void commonj::sdo::internal::SDOUtils::printTypes(std::ostream&, commonj::sdo::DataFactoryPtr)':
SDOUtils.cpp:278: error: conversion from 'const commonj::sdo::RefCountingPointer<commonj::sdo::PropertyImpl>' to 'commonj::sdo::RefCountingPointer<commonj::sdo::Property>' is ambiguous
../../../../../runtime/core/src/commonj/sdo/RefCountingPointer.h:80: note: candidates are: commonj::sdo::RefCountingPointer<T>::operator commonj::sdo::RefCountingPointer<otherType>() [with otherType = commonj::sdo::Property, T = commonj::sdo::PropertyImpl] <near match>
../../../../../runtime/core/src/commonj/sdo/RefCountingPointer.h:86: note: commonj::sdo::RefCountingPointer<T>::operator const commonj::sdo::RefCountingPointer<otherType>() const [with otherType = commonj::sdo::Property, T = commonj::sdo::PropertyImpl]
../../../../../runtime/core/src/commonj/sdo/RefCountingPointer.h:57: note: commonj::sdo::RefCountingPointer<T>::RefCountingPointer(const commonj::sdo::RefCountingPointer<otherType>&) [with otherType = commonj::sdo::PropertyImpl, T = commonj::sdo::Property]
make[5]: *** [SDOUtils.lo] Error 1
> SDOUtils.cpp does not compile due to problematic cast
> -----------------------------------------------------
>
> Key: TUSCANY-1695
> URL: https://issues.apache.org/jira/browse/TUSCANY-1695
> Project: Tuscany
> Issue Type: Bug
> Components: C++ Build
> Affects Versions: Cpp-Next
> Environment: Linux Fedora Core 2.6.21-1.3194.fc7
> g++ (GCC) 4.1.2 20070502 (Red Hat 4.1.2-12)
> Reporter: Ralf Henschkowski
>
> compiler sees ambiguitiy in the following line:
> ===================================================================
> --- sdo/runtime/core/src/commonj/sdo/SDOUtils.cpp (revision 575198)
> +++ sdo/runtime/core/src/commonj/sdo/SDOUtils.cpp (working copy)
> @@ -275,7 +275,7 @@
> j != pl.end();
> j++)
> {
> - PropertyPtr current = *j;
> + PropertyPtr current = (PropertyPtr)*j;
> out << "\tProperty: "
> << current->getName()
> Explicit cast helped to compile it, but I'm not sure if it is a fix ...
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org