* [PATCH] opensm: fixing compilation issues in some header files
@ 2010-03-24 15:50 Yevgeny Kliteynik
[not found] ` <4BAA34B2.9060808-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
0 siblings, 1 reply; 11+ messages in thread
From: Yevgeny Kliteynik @ 2010-03-24 15:50 UTC (permalink / raw)
To: Sasha Khapyorsky, Linux RDMA
All the compilation issues refer to implicit casting
from "void*" to "some_struct_t*"
Signed-off-by: Yevgeny Kliteynik <kliteyn-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
---
opensm/include/opensm/osm_pkey.h | 8 +++++---
opensm/include/opensm/osm_port.h | 4 ++--
opensm/include/opensm/osm_subnet.h | 2 +-
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/opensm/include/opensm/osm_pkey.h b/opensm/include/opensm/osm_pkey.h
index d10479d..53e9657 100644
--- a/opensm/include/opensm/osm_pkey.h
+++ b/opensm/include/opensm/osm_pkey.h
@@ -252,7 +252,8 @@ static inline ib_pkey_table_t *osm_pkey_tbl_block_get(const osm_pkey_tbl_t *
uint16_t block)
{
return ((block < cl_ptr_vector_get_size(&p_pkey_tbl->blocks)) ?
- cl_ptr_vector_get(&p_pkey_tbl->blocks, block) : NULL);
+ (ib_pkey_table_t *)cl_ptr_vector_get(
+ &p_pkey_tbl->blocks, block) : NULL);
};
/*
@@ -282,8 +283,9 @@ static inline ib_pkey_table_t *osm_pkey_tbl_new_block_get(const osm_pkey_tbl_t *
p_pkey_tbl,
uint16_t block)
{
- return (block < cl_ptr_vector_get_size(&p_pkey_tbl->new_blocks)) ?
- cl_ptr_vector_get(&p_pkey_tbl->new_blocks, block) : NULL;
+ return ((block < cl_ptr_vector_get_size(&p_pkey_tbl->new_blocks)) ?
+ (ib_pkey_table_t *)cl_ptr_vector_get(
+ &p_pkey_tbl->new_blocks, block) : NULL);
};
/****f* OpenSM: osm_pkey_tbl_set_new_entry
diff --git a/opensm/include/opensm/osm_port.h b/opensm/include/opensm/osm_port.h
index ff0a178..8c68c99 100644
--- a/opensm/include/opensm/osm_port.h
+++ b/opensm/include/opensm/osm_port.h
@@ -549,7 +549,7 @@ static inline void osm_physp_set_slvl_tbl(IN osm_physp_t * p_physp,
CL_ASSERT(p_slvl_tbl);
CL_ASSERT(osm_physp_is_valid(p_physp));
- p_tbl = cl_ptr_vector_get(&p_physp->slvl_by_port, in_port_num);
+ p_tbl = (ib_slvl_table_t *)cl_ptr_vector_get(&p_physp->slvl_by_port, in_port_num);
*p_tbl = *p_slvl_tbl;
}
@@ -590,7 +590,7 @@ static inline ib_slvl_table_t *osm_physp_get_slvl_tbl(IN const osm_physp_t *
ib_slvl_table_t *p_tbl;
CL_ASSERT(osm_physp_is_valid(p_physp));
- p_tbl = cl_ptr_vector_get(&p_physp->slvl_by_port, in_port_num);
+ p_tbl = (ib_slvl_table_t *)cl_ptr_vector_get(&p_physp->slvl_by_port, in_port_num);
return p_tbl;
}
diff --git a/opensm/include/opensm/osm_subnet.h b/opensm/include/opensm/osm_subnet.h
index 3970e98..2eef9c7 100644
--- a/opensm/include/opensm/osm_subnet.h
+++ b/opensm/include/opensm/osm_subnet.h
@@ -1015,7 +1015,7 @@ struct osm_mgrp *osm_get_mgrp_by_mgid(IN osm_subn_t * subn, IN ib_gid_t * mgid);
*/
static inline struct osm_mgrp_box *osm_get_mbox_by_mlid(osm_subn_t const *p_subn, ib_net16_t mlid)
{
- return p_subn->mboxes[cl_ntoh16(mlid) - IB_LID_MCAST_START_HO];
+ return (struct osm_mgrp_box *)p_subn->mboxes[cl_ntoh16(mlid) - IB_LID_MCAST_START_HO];
}
/*
* PARAMETERS
--
1.5.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] opensm: fixing compilation issues in some header files
[not found] ` <4BAA34B2.9060808-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
@ 2010-06-01 11:58 ` Yevgeny Kliteynik
[not found] ` <4C04F5E7.8030904-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2010-06-01 19:23 ` Sasha Khapyorsky
1 sibling, 1 reply; 11+ messages in thread
From: Yevgeny Kliteynik @ 2010-06-01 11:58 UTC (permalink / raw)
To: Sasha Khapyorsky, Linux RDMA
Sasha,
On 24-Mar-10 5:50 PM, Yevgeny Kliteynik wrote:
> All the compilation issues refer to implicit casting
> from "void*" to "some_struct_t*"
This was detected when compiling a code that includes these
headers with g++ compiler. The headers should be able to compile
by g++ (they have 'extern "C"'). But the problem is not only
with g++ - it is with typing in general. I may be wrong, but I
feel that every new gcc version is more strongly typed.
Moreover, it appears that it would be more strongly typed in the
future, as GCC folks themselves are starting to compile GCC
with G++:
http://gcc.gnu.org/ml/gcc/2010-05/msg00705.html
-- Yevgeny
> Signed-off-by: Yevgeny Kliteynik<kliteyn-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
> ---
> opensm/include/opensm/osm_pkey.h | 8 +++++---
> opensm/include/opensm/osm_port.h | 4 ++--
> opensm/include/opensm/osm_subnet.h | 2 +-
> 3 files changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/opensm/include/opensm/osm_pkey.h b/opensm/include/opensm/osm_pkey.h
> index d10479d..53e9657 100644
> --- a/opensm/include/opensm/osm_pkey.h
> +++ b/opensm/include/opensm/osm_pkey.h
> @@ -252,7 +252,8 @@ static inline ib_pkey_table_t *osm_pkey_tbl_block_get(const osm_pkey_tbl_t *
> uint16_t block)
> {
> return ((block< cl_ptr_vector_get_size(&p_pkey_tbl->blocks)) ?
> - cl_ptr_vector_get(&p_pkey_tbl->blocks, block) : NULL);
> + (ib_pkey_table_t *)cl_ptr_vector_get(
> + &p_pkey_tbl->blocks, block) : NULL);
> };
>
> /*
> @@ -282,8 +283,9 @@ static inline ib_pkey_table_t *osm_pkey_tbl_new_block_get(const osm_pkey_tbl_t *
> p_pkey_tbl,
> uint16_t block)
> {
> - return (block< cl_ptr_vector_get_size(&p_pkey_tbl->new_blocks)) ?
> - cl_ptr_vector_get(&p_pkey_tbl->new_blocks, block) : NULL;
> + return ((block< cl_ptr_vector_get_size(&p_pkey_tbl->new_blocks)) ?
> + (ib_pkey_table_t *)cl_ptr_vector_get(
> + &p_pkey_tbl->new_blocks, block) : NULL);
> };
>
> /****f* OpenSM: osm_pkey_tbl_set_new_entry
> diff --git a/opensm/include/opensm/osm_port.h b/opensm/include/opensm/osm_port.h
> index ff0a178..8c68c99 100644
> --- a/opensm/include/opensm/osm_port.h
> +++ b/opensm/include/opensm/osm_port.h
> @@ -549,7 +549,7 @@ static inline void osm_physp_set_slvl_tbl(IN osm_physp_t * p_physp,
>
> CL_ASSERT(p_slvl_tbl);
> CL_ASSERT(osm_physp_is_valid(p_physp));
> - p_tbl = cl_ptr_vector_get(&p_physp->slvl_by_port, in_port_num);
> + p_tbl = (ib_slvl_table_t *)cl_ptr_vector_get(&p_physp->slvl_by_port, in_port_num);
> *p_tbl = *p_slvl_tbl;
> }
>
> @@ -590,7 +590,7 @@ static inline ib_slvl_table_t *osm_physp_get_slvl_tbl(IN const osm_physp_t *
> ib_slvl_table_t *p_tbl;
>
> CL_ASSERT(osm_physp_is_valid(p_physp));
> - p_tbl = cl_ptr_vector_get(&p_physp->slvl_by_port, in_port_num);
> + p_tbl = (ib_slvl_table_t *)cl_ptr_vector_get(&p_physp->slvl_by_port, in_port_num);
> return p_tbl;
> }
>
> diff --git a/opensm/include/opensm/osm_subnet.h b/opensm/include/opensm/osm_subnet.h
> index 3970e98..2eef9c7 100644
> --- a/opensm/include/opensm/osm_subnet.h
> +++ b/opensm/include/opensm/osm_subnet.h
> @@ -1015,7 +1015,7 @@ struct osm_mgrp *osm_get_mgrp_by_mgid(IN osm_subn_t * subn, IN ib_gid_t * mgid);
> */
> static inline struct osm_mgrp_box *osm_get_mbox_by_mlid(osm_subn_t const *p_subn, ib_net16_t mlid)
> {
> - return p_subn->mboxes[cl_ntoh16(mlid) - IB_LID_MCAST_START_HO];
> + return (struct osm_mgrp_box *)p_subn->mboxes[cl_ntoh16(mlid) - IB_LID_MCAST_START_HO];
> }
> /*
> * PARAMETERS
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] opensm: fixing compilation issues in some header files
[not found] ` <4C04F5E7.8030904-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
@ 2010-06-01 19:22 ` Sasha Khapyorsky
2010-06-01 21:18 ` Yevgeny Kliteynik
0 siblings, 1 reply; 11+ messages in thread
From: Sasha Khapyorsky @ 2010-06-01 19:22 UTC (permalink / raw)
To: Yevgeny Kliteynik; +Cc: Linux RDMA
Hi Yevgeny,
On 14:58 Tue 01 Jun , Yevgeny Kliteynik wrote:
>
> On 24-Mar-10 5:50 PM, Yevgeny Kliteynik wrote:
> > All the compilation issues refer to implicit casting
> > from "void*" to "some_struct_t*"
>
> This was detected when compiling a code that includes these
> headers with g++ compiler. The headers should be able to compile
> by g++ (they have 'extern "C"').
Well let's apply the patch since we have 'extern "C"'.
But this raises another question. All affected header files are OpenSM
internals and OpenSM is written in C (not C++). So why 'extern "C"'
should be here at all? Do you know?
> But the problem is not only
> with g++ - it is with typing in general. I may be wrong, but I
> feel that every new gcc version is more strongly typed.
AFAIR (anytype *) to (void *) casting is not needed (doing implicitly)
in C and this is already part of some basic standards.
Sasha
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] opensm: fixing compilation issues in some header files
[not found] ` <4BAA34B2.9060808-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2010-06-01 11:58 ` Yevgeny Kliteynik
@ 2010-06-01 19:23 ` Sasha Khapyorsky
1 sibling, 0 replies; 11+ messages in thread
From: Sasha Khapyorsky @ 2010-06-01 19:23 UTC (permalink / raw)
To: Yevgeny Kliteynik; +Cc: Linux RDMA
On 17:50 Wed 24 Mar , Yevgeny Kliteynik wrote:
> All the compilation issues refer to implicit casting
> from "void*" to "some_struct_t*"
>
> Signed-off-by: Yevgeny Kliteynik <kliteyn-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
Applied. Thanks. However see a comment below.
> ---
> opensm/include/opensm/osm_pkey.h | 8 +++++---
> opensm/include/opensm/osm_port.h | 4 ++--
> opensm/include/opensm/osm_subnet.h | 2 +-
> 3 files changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/opensm/include/opensm/osm_pkey.h b/opensm/include/opensm/osm_pkey.h
> index d10479d..53e9657 100644
> --- a/opensm/include/opensm/osm_pkey.h
> +++ b/opensm/include/opensm/osm_pkey.h
> @@ -252,7 +252,8 @@ static inline ib_pkey_table_t *osm_pkey_tbl_block_get(const osm_pkey_tbl_t *
> uint16_t block)
> {
> return ((block < cl_ptr_vector_get_size(&p_pkey_tbl->blocks)) ?
> - cl_ptr_vector_get(&p_pkey_tbl->blocks, block) : NULL);
> + (ib_pkey_table_t *)cl_ptr_vector_get(
> + &p_pkey_tbl->blocks, block) : NULL);
> };
>
> /*
> @@ -282,8 +283,9 @@ static inline ib_pkey_table_t *osm_pkey_tbl_new_block_get(const osm_pkey_tbl_t *
> p_pkey_tbl,
> uint16_t block)
> {
> - return (block < cl_ptr_vector_get_size(&p_pkey_tbl->new_blocks)) ?
> - cl_ptr_vector_get(&p_pkey_tbl->new_blocks, block) : NULL;
> + return ((block < cl_ptr_vector_get_size(&p_pkey_tbl->new_blocks)) ?
> + (ib_pkey_table_t *)cl_ptr_vector_get(
> + &p_pkey_tbl->new_blocks, block) : NULL);
> };
>
> /****f* OpenSM: osm_pkey_tbl_set_new_entry
> diff --git a/opensm/include/opensm/osm_port.h b/opensm/include/opensm/osm_port.h
> index ff0a178..8c68c99 100644
> --- a/opensm/include/opensm/osm_port.h
> +++ b/opensm/include/opensm/osm_port.h
> @@ -549,7 +549,7 @@ static inline void osm_physp_set_slvl_tbl(IN osm_physp_t * p_physp,
>
> CL_ASSERT(p_slvl_tbl);
> CL_ASSERT(osm_physp_is_valid(p_physp));
> - p_tbl = cl_ptr_vector_get(&p_physp->slvl_by_port, in_port_num);
> + p_tbl = (ib_slvl_table_t *)cl_ptr_vector_get(&p_physp->slvl_by_port, in_port_num);
> *p_tbl = *p_slvl_tbl;
> }
>
> @@ -590,7 +590,7 @@ static inline ib_slvl_table_t *osm_physp_get_slvl_tbl(IN const osm_physp_t *
> ib_slvl_table_t *p_tbl;
>
> CL_ASSERT(osm_physp_is_valid(p_physp));
> - p_tbl = cl_ptr_vector_get(&p_physp->slvl_by_port, in_port_num);
> + p_tbl = (ib_slvl_table_t *)cl_ptr_vector_get(&p_physp->slvl_by_port, in_port_num);
> return p_tbl;
> }
>
> diff --git a/opensm/include/opensm/osm_subnet.h b/opensm/include/opensm/osm_subnet.h
> index 3970e98..2eef9c7 100644
> --- a/opensm/include/opensm/osm_subnet.h
> +++ b/opensm/include/opensm/osm_subnet.h
> @@ -1015,7 +1015,7 @@ struct osm_mgrp *osm_get_mgrp_by_mgid(IN osm_subn_t * subn, IN ib_gid_t * mgid);
> */
> static inline struct osm_mgrp_box *osm_get_mbox_by_mlid(osm_subn_t const *p_subn, ib_net16_t mlid)
> {
> - return p_subn->mboxes[cl_ntoh16(mlid) - IB_LID_MCAST_START_HO];
> + return (struct osm_mgrp_box *)p_subn->mboxes[cl_ntoh16(mlid) - IB_LID_MCAST_START_HO];
In this case I would suggest to define p_subn->mboxes[] to have
appropriate type and so to avoid the casting issue.
Sasha
> }
> /*
> * PARAMETERS
> --
> 1.5.1.4
>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] opensm: fixing compilation issues in some header files
2010-06-01 19:22 ` Sasha Khapyorsky
@ 2010-06-01 21:18 ` Yevgeny Kliteynik
[not found] ` <4C057940.1020106-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
0 siblings, 1 reply; 11+ messages in thread
From: Yevgeny Kliteynik @ 2010-06-01 21:18 UTC (permalink / raw)
To: Sasha Khapyorsky; +Cc: Linux RDMA
On 01-Jun-10 10:22 PM, Sasha Khapyorsky wrote:
> Hi Yevgeny,
>
> On 14:58 Tue 01 Jun , Yevgeny Kliteynik wrote:
>>
>> On 24-Mar-10 5:50 PM, Yevgeny Kliteynik wrote:
>>> All the compilation issues refer to implicit casting
>>> from "void*" to "some_struct_t*"
>>
>> This was detected when compiling a code that includes these
>> headers with g++ compiler. The headers should be able to compile
>> by g++ (they have 'extern "C"').
>
> Well let's apply the patch since we have 'extern "C"'.
>
> But this raises another question. All affected header files are OpenSM
> internals and OpenSM is written in C (not C++). So why 'extern "C"'
> should be here at all? Do you know?
>
>> But the problem is not only
>> with g++ - it is with typing in general. I may be wrong, but I
>> feel that every new gcc version is more strongly typed.
>
> AFAIR (anytype *) to (void *) casting is not needed (doing implicitly)
> in C and this is already part of some basic standards.
True, but the problem is not (anytype *) to (void *) casting.
It's the other way around: (void *) to (anytype *) casting.
-- Yevgeny
> Sasha
>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] opensm: fixing compilation issues in some header files
[not found] ` <4C057940.1020106-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
@ 2010-06-02 1:03 ` Sasha Khapyorsky
2010-06-02 7:29 ` Yevgeny Kliteynik
0 siblings, 1 reply; 11+ messages in thread
From: Sasha Khapyorsky @ 2010-06-02 1:03 UTC (permalink / raw)
To: Yevgeny Kliteynik; +Cc: Linux RDMA
On 00:18 Wed 02 Jun , Yevgeny Kliteynik wrote:
> >
> > AFAIR (anytype *) to (void *) casting is not needed (doing implicitly)
> > in C and this is already part of some basic standards.
>
> True, but the problem is not (anytype *) to (void *) casting.
> It's the other way around: (void *) to (anytype *) casting.
It is the same meaning. Otherwise it would be useless.
Sasha
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] opensm: fixing compilation issues in some header files
2010-06-02 1:03 ` Sasha Khapyorsky
@ 2010-06-02 7:29 ` Yevgeny Kliteynik
[not found] ` <4C06084D.3070101-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
0 siblings, 1 reply; 11+ messages in thread
From: Yevgeny Kliteynik @ 2010-06-02 7:29 UTC (permalink / raw)
To: Sasha Khapyorsky; +Cc: Linux RDMA
On 02-Jun-10 4:03 AM, Sasha Khapyorsky wrote:
> On 00:18 Wed 02 Jun , Yevgeny Kliteynik wrote:
>>>
>>> AFAIR (anytype *) to (void *) casting is not needed (doing implicitly)
>>> in C and this is already part of some basic standards.
>>
>> True, but the problem is not (anytype *) to (void *) casting.
>> It's the other way around: (void *) to (anytype *) casting.
>
> It is the same meaning. Otherwise it would be useless.
No, it's not.
Casting TO void* is not dangerous - void* is just a "place holder".
Casting FROM void* is more dangerous - it means your program would
actually be using this pointer's content.
Right now gcc allows you to do implicit casting in both ways, g++ doesn't.
Try compiling this code:
#include <stdlib.h>
int main()
{
void * v = NULL;
int * t = NULL;
v = t;
t = v;
return 0;
}
try.cc:7: error: invalid conversion from 'void*' to 'int*'
Here are more details:
http://www2.research.att.com/~bs/bs_faq2.html#void-ptr
-- Yevgeny
> Sasha
>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] opensm: fixing compilation issues in some header files
[not found] ` <4C06084D.3070101-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
@ 2010-06-02 15:18 ` Sasha Khapyorsky
2010-06-02 15:30 ` Hal Rosenstock
0 siblings, 1 reply; 11+ messages in thread
From: Sasha Khapyorsky @ 2010-06-02 15:18 UTC (permalink / raw)
To: Yevgeny Kliteynik; +Cc: Linux RDMA
On 10:29 Wed 02 Jun , Yevgeny Kliteynik wrote:
>
> Right now gcc allows you to do implicit casting in both ways, g++ doesn't.
OpenSM is written in C, not C++.
Sasha
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] opensm: fixing compilation issues in some header files
2010-06-02 15:18 ` Sasha Khapyorsky
@ 2010-06-02 15:30 ` Hal Rosenstock
[not found] ` <AANLkTinyMA8WyFPee755nelj9gxJKTP7mQChYlDkUF4J-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 11+ messages in thread
From: Hal Rosenstock @ 2010-06-02 15:30 UTC (permalink / raw)
To: Sasha Khapyorsky; +Cc: Yevgeny Kliteynik, Linux RDMA
On Wed, Jun 2, 2010 at 11:18 AM, Sasha Khapyorsky <sashak-smomgflXvOZWk0Htik3J/w@public.gmane.org> wrote:
> On 10:29 Wed 02 Jun , Yevgeny Kliteynik wrote:
>>
>> Right now gcc allows you to do implicit casting in both ways, g++ doesn't.
>
> OpenSM is written in C, not C++.
g++ can be used as a (better) C compiler. Shouldn't compilation with
g++ be supported ?
-- Hal
>
> Sasha
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] opensm: fixing compilation issues in some header files
[not found] ` <AANLkTinyMA8WyFPee755nelj9gxJKTP7mQChYlDkUF4J-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2010-06-02 16:05 ` Sasha Khapyorsky
2010-06-02 16:28 ` Roland Dreier
1 sibling, 0 replies; 11+ messages in thread
From: Sasha Khapyorsky @ 2010-06-02 16:05 UTC (permalink / raw)
To: Hal Rosenstock; +Cc: Yevgeny Kliteynik, Linux RDMA
On 11:30 Wed 02 Jun , Hal Rosenstock wrote:
>
> g++ can be used as a (better) C compiler. Shouldn't compilation with
> g++ be supported ?
What would this buy for us?
BTW why is g++ better as C compiler?
Sasha
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] opensm: fixing compilation issues in some header files
[not found] ` <AANLkTinyMA8WyFPee755nelj9gxJKTP7mQChYlDkUF4J-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-06-02 16:05 ` Sasha Khapyorsky
@ 2010-06-02 16:28 ` Roland Dreier
1 sibling, 0 replies; 11+ messages in thread
From: Roland Dreier @ 2010-06-02 16:28 UTC (permalink / raw)
To: Hal Rosenstock; +Cc: Sasha Khapyorsky, Yevgeny Kliteynik, Linux RDMA
> g++ can be used as a (better) C compiler. Shouldn't compilation with
> g++ be supported ?
g++ is not a C compiler. C++ is not just a superset of C The
differences in the semantics of void* pointers are just one example; in
addition C++ does not have designated initializers for structures, some
valid C names are reserved words in C++, etc.
- R.
--
Roland Dreier <rolandd-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org> || For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/index.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2010-06-02 16:28 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-24 15:50 [PATCH] opensm: fixing compilation issues in some header files Yevgeny Kliteynik
[not found] ` <4BAA34B2.9060808-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2010-06-01 11:58 ` Yevgeny Kliteynik
[not found] ` <4C04F5E7.8030904-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2010-06-01 19:22 ` Sasha Khapyorsky
2010-06-01 21:18 ` Yevgeny Kliteynik
[not found] ` <4C057940.1020106-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2010-06-02 1:03 ` Sasha Khapyorsky
2010-06-02 7:29 ` Yevgeny Kliteynik
[not found] ` <4C06084D.3070101-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2010-06-02 15:18 ` Sasha Khapyorsky
2010-06-02 15:30 ` Hal Rosenstock
[not found] ` <AANLkTinyMA8WyFPee755nelj9gxJKTP7mQChYlDkUF4J-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-06-02 16:05 ` Sasha Khapyorsky
2010-06-02 16:28 ` Roland Dreier
2010-06-01 19:23 ` Sasha Khapyorsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox