0

I've looked at other entries in stack overflow, but they are legitimately "above" the bounds.

In my code, I am winding my way through a nested series of structures:

static inline void * get_resp_ptr(U32 blade_ix, U32 q_id)
{
    per_blade_data *  bd  = bfr_blade_data + blade_ix;
    bfr_pendcmd_q_t * pcq = bd->bfrpb_ques + q_id;
    response_t *      res = pcq->bfrpq_resp;
    return (void *)(res + pcq->bfrpq_resp_rdix);
}

"bfrpq_resp" is a pointer to type response_t. The last two lines of this function both get the error message. Beats heck out of me....Any guesses about what the compiler is trying to say? I'm tempted to cast into uintptr_t and just use arithmetic. :(

Edit: that didn't work. The assignment of pcq->bfrpq_resp to a uintptr_t resulted in the same error message. Merely referencing the field yields the result. I think GCC needs a different error message here.

2 Answers 2

1

It could be because of http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45978 , if your gcc version is below 4.7.0

Sign up to request clarification or add additional context in comments.

1 Comment

Conceivably. I am a bit dubious because I do not index bfrpq_resp on that line. Not until the return statement. Then again, I am using: mips64-octeon-linux-gnu-gcc (Cavium Inc. Version: 2_3_0 build 116) 4.3.3, perhaps too old for that bug ;). Another possibility is some confusion about bfrpb_ques + q_id. That is an array of 9 elements where q_id is always passed as a constant 0 thru 8. I'll run that down.....
0

GCC bug triggered by my own coding. GCC points to that line, but the issue is the previous line caused by stumbled fingers. Thank you. I won't file a GCC bug because 4.3.3 is a bit long in the tooth.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.