This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ Patch] PR 35321
- From: "Manuel López-Ibáñez" <lopezibanez at gmail dot com>
- To: "Paolo Carlini" <paolo dot carlini at oracle dot com>
- Cc: "Gcc Patch List" <gcc-patches at gcc dot gnu dot org>, "Mark Mitchell" <mark at codesourcery dot com>
- Date: Sun, 17 Aug 2008 22:26:04 +0200
- Subject: Re: [C++ Patch] PR 35321
- References: <48A86360.8010104@oracle.com>
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 '.'