participate


Sun Studio C - studio10, compilation failure with FAM
<<   Back to Forum  |   Give us Feedback
This topic has 2 replies on 1 page.
r_kunisawa_sundev
Posts:7
Registered: 3/23/05
studio10, compilation failure with FAM   
Jan 30, 2005 7:21 PM

 
Hi,
I just tried studio10, and its a great product! Thank you very much!

I found a minor problem, however.
A struct with a FAM, first appears as an incomplete type,
prevents compilation failure.

struct yyyy;
 
extern int fn_1(const struct yyyy *q);
 
#if defined DEF_YYYY_W_O_FAM
struct yyyy
{
  struct xxxx *m0;
  int m1[1];
};
#endif
 
#if defined DEF_YYYY_WITH_FAM
struct yyyy
{
  struct xxxx *m0;
  int m1[];
};
#endif
 
int
fn_1(const struct yyyy *q)
{
  return 10;
}


% cc -c fam_1.c
% cc -c -DDEF_YYYY_W_O_FAM fam_1.c
% cc -c -DDEF_YYYY_WITH_FAM fam_1.c
"fam_1.c", line 23: identifier redeclared: fn_1
current : function(pointer to const struct yyyy {pointer to struct xxxx {..} m0, array[-1] of int m1}) returning int
previous: function(pointer to const struct yyyy {pointer to struct xxxx {..} m0, array[-1] of int m1}) returning int : "fam_1.c", line 3
cc: acomp failed for fam_1.c

I'm not a C expert, but is this an intended behaviour?

Best Regards,
rk
 
songweili
Posts:414
Registered: 1/18/02
Re: studio10, compilation failure with FAM   
Feb 3, 2005 9:54 AM (reply 1 of 2)  (In reply to original post )

 
Hi,

This is a bug. We would like to file a bug report. Can you please file your information in the following URL:

<http://developers.sun.com/contact/swcontactform.jsp?requrl=/UserTypedUrl&category=studio>

I will contact you later.

Thanks.

--
Rose Lee
Sun Studio Support Group
Sun Microsystems
 
r_kunisawa_sundev
Posts:7
Registered: 3/23/05
Re: studio10, compilation failure with FAM   
Feb 8, 2005 12:42 AM (reply 2 of 2)  (In reply to #1 )

 
Hi,

I just sent my contact information.
Thanks for your good support!

rk
 
This topic has 2 replies on 1 page.
Back to Forum
 
Read the Developer Forums Code of Conduct

Click to email this message Email this Topic

Edit this Topic
  
 
 
Forums Statistics
    Users Online : 28
  • Guests : 133

About Sun forums
  • Oracle Forums is a large collection of user generated discussions. It is here to help you ask questions, find answers, and participate in discussions.

    Check out our guide on Getting started with Oracle Forums for a full walkthrough of how to best leverage the benefits of this community.

Powered by Jive Forums