This is the mail archive of the gcc-patches@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: Patch to detect invalid and missing ATTRIBUTE const/pure [take 2]


On Mon, Mar 25, 2002 at 12:54:59AM -0500, Kaveh R. Ghazi wrote:
>  > No.  const functions may be moved outside a loop, and if left 
>  > inside the loop, may never be reached.
[...]
> However given that the programmer may "know" that the noreturn call
> never occurs in practice, does it make sense to bypass the warning
> about the marking being "invalid" should the programmer decide to mark
> it explicitly?

No.  Like I just said, const functions may be called in
cases that they weren't in the source code.


r~


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