Unix Technical Forum

help needed for "-qinfo" option for VisualAge C++ (Version 6)

This is a discussion on help needed for "-qinfo" option for VisualAge C++ (Version 6) within the AIX Operating System forums, part of the Unix Operating Systems category; --> Hi, I have a VisualAge C++ compiler(Version 6). I have tried to compile the following simple code (test.cxx) with ...


Go Back   Unix Technical Forum > Unix Operating Systems > AIX Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-05-2008, 07:32 AM
Jyotirmoy
 
Posts: n/a
Default help needed for "-qinfo" option for VisualAge C++ (Version 6)

Hi,

I have a VisualAge C++ compiler(Version 6). I have tried to compile the
following simple code (test.cxx) with xlC:

main(){
char c = 'a';
char *pc = &c;
int *pi;

pi = (int *)pc;
}

If I compile the above test.cxx with "-qinfo=cnv", the compiler doesn't
emit any warning. But if I compile the same file with "-qinfo" equal to
any of the 11 values(cnd, eff, gnr, got, par, por, ppc, rea, trd, uni,
use), the compiler emits the following warning:
"test.cxx", line 7.29: 1540-5344 (I) Pointer type "int *" and type
"char *" are not compatible in the current aliasing mode.

It seems the values for "-qinfo" options are not behaving correctly.
For example, by putting "-qinfo=got", I expect to get warnings for goto
statements; but it is giving me a warning for a type-conversion! I
expected "-qinfo=cnv" to warn me of any type conversion; but it didn't
complain anything!!!

I am new to AIX and xlC. Can someone in this newgroup explain this
abnormal behavior of "-qinfo" option?

Thanks in advance.

Jyotirmoy

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-05-2008, 07:32 AM
Gary R. Hook
 
Posts: n/a
Default Re: help needed for "-qinfo" option for VisualAge C++ (Version 6)

Jyotirmoy wrote:
> If I compile the above test.cxx with "-qinfo=cnv", the compiler doesn't
> emit any warning. But if I compile the same file with "-qinfo" equal to
> any of the 11 values(cnd, eff, gnr, got, par, por, ppc, rea, trd, uni,
> use), the compiler emits the following warning:
> "test.cxx", line 7.29: 1540-5344 (I) Pointer type "int *" and type
> "char *" are not compatible in the current aliasing mode.


It would seem that there are some information messages that don't
fit any of the documented class. Not necessarily abnormal.

--
Gary R. Hook
__________________________________________________ ______________________
Vocatus atque non vocatus deus aderit
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:12 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com