This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Clarifying attribute-const


> Can you expand on the "etc." a bit, i.e., may the compiler ...
> 
>   - move a call to a "const" function above a conditional branch,
>     causing a conditional throw to happen unconditionally?
> 
>   - move a call to a "const" function below a conditional branch,
>     causing an unconditional throw to happen only conditionally?

The implementation permission is that you may omit calls to such functions, 
not that you can introduce them, so No and Yes respectively.

>   - reorder calls to "const" functions  w.r.t. code with side effects, or
>     other throwing functions?

This one is less clear, but I'd say Yes.

-- 
Eric Botcazou


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]