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: [C++ Patch] PR 35321


2008/8/17 Paolo Carlini <paolo.carlini@oracle.com>:
> +   __builtin_offsetof(B, a[0]); /* { dg-error "error: cannot
> apply.*offsetof" } */

I am sorry for being so picky but I would suggest to not use ".*" in
matches That will match anything including newlines. I guess that in
this case it would be very strange to generate by error multiple
messages that start with "cannot apply" and finish with  offsetof.
However, it is better to be consistent.

In this case you just need "error: cannot apply .offsetof" but I think
it would be better if you use:

"error: cannot apply .offsetof. when .operator[]. is overloaded"

If such message changes in the future we can do a "find + sed" for all
instances. However, matching a partial message is more error prone
(less future proof).

Cheers,

Manuel.

PS: To really match anything but not newlines you should use \[^\n\]*.
I wish there was a way to tell DejaGNU to not match newlines with '.'


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