[prev in list] [next in list] [prev in thread] [next in thread]
List: hpux-cxx-dev
Subject: Re: CXX-DEV: Bogus remark #20206-D or compiler bug?
From: Dennis Handly <dhandly () cup ! hp ! com>
Date: 2008-02-21 1:25:11
Message-ID: 200802210125.RAA06877 () hpcll183 ! cup ! hp ! com
[Download RAW message or body]
>From: Liviu Nicoara <nicoara@roguewave.com>
>The following test case is a reduction of a translation unit in one of
>our libraries. HP aCC 6.16 emits a remark here, #20206-D ("Out of
>bound access") which seems to be bogus. Before I go ahead and silence
>it I would like to ask whether in your opinion there is substance to
>it or not.
It is bogus in the case of the .* operator.
It occurs with the generated code for pointers to member
functions that has to look at the virtual table pointer. In the case of
struct A, there isn't any. But a derived class from A could have them.
The code is conditioned at runtime but the compiler warning isn't.
void run() const { (callee_.*function_)(); }
R (T::*function_)();
struct A {
int a;
void foo() {}
};
>procedure run: warning #20206-D: Out of bound access
>(In expression "*(char**)__tempVar_1", variable "__tempVar_1"
>(type: struct A* ) has 4 bytes, reading byte range [0 .. 7].)
The only solution for the compiler is to suppress 20206 for compiler
generated temps.
_________________________________________________________________
To leave this mailing list, send mail to majordomo@cxx.cup.hp.com
with the message UNSUBSCRIBE cxx-dev
_________________________________________________________________
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic