The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM


High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 07-22-2004
Registered User
 

Join Date: Oct 2003
Posts: 32
AIX- xlc and cc

when i compile with Xlc i sometimes get the following Error:
(S) Initialization between types "int" and "struct MskTtimerData*" is not allowed.

when i compile with cc with the same Flags, i only get a (W) with the same message, but it compiles fine.

How can i get the Xlc to 'ignore' the above error like cc ?

Lazzar
Reply With Quote
Forum Sponsor
  #2  
Old 07-22-2004
Registered User
 

Join Date: Oct 2003
Posts: 32
hey, thanks for the fast reply.

It is a kinda big already existing project wich we are updating.

And we just recently upgraded from 32 Aix4 to 64 bit Aix5 also.
So a (int) cast would prolly be a bad idea (truncating the pointer?).

but i see where the problem is now.

Thanks a lot.
Lazzar
Reply With Quote
  #3  
Old 07-23-2004
Registered User
 

Join Date: Oct 2003
Posts: 32
Found the Bugger now.
The Structure with the Pointer to MskTtimerData has changed.

old struct {
int;
MskTtimerData *
}

new struct {
int
int, <--- We tried to insert the Pointer here
int,
MskTtimerData *
}

oh well, i thought i have checked all the structures.

I just hope thats the only one who chnaged.
There might be other changes where the compiler wontt burp.

i have some testing to do now

Lazzar


edit
Quote:
However, if ALL of these warnings only occur in more or less dead and unimportant code passages that are not likely to be encountered by your users any time soon, what's preventing you from using ``cc'' instead of ``xlc'' to compile it anyway?
hehe, never think that way, users will always find your 'unimportant' code passages.
And then the truncated pointer would 99% result in a Sig 11
Reply With Quote
  #4  
Old 07-23-2004
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 4,274
I am not familiar with Xlc, except that it is an AIX thing.

It seems, from your conversation, that it behaves like lint, which should be part of any C development IMO.

Does someone know a little more about Xlc?
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 06:38 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0