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: ObjC patch: fix CLASS_HAS_EXCEPTION_ATTR


On Feb 22, 2011, at 3:22 PM, Nicola Pero wrote:
> This patch fixes one of the pending FIXMEs with the big ObjC patch committed
> a few days ago, which is

> I also added a basic testcase for "attribute((objc_exception))".  It only checks that
> the attribute is accepted correctly; it would be good to have a testcase checking metadata
> generation for Apple 64-bit (I did check that the flag gets detected correctly during
> metadata generation by just hacking some code into the compiler; it would be nice to have a
> complete standard test for the Apple 64-bit that checks the actual output).

You can test the metadata by using scan and just having a snippet that you know is correct.

An example from the testsuite:

	/* { dg-final { scan-assembler ".globl _a.*.data.*.space\[\t \]1" } } */

. matches \n as well, and the thing to match is the entire .s file produced.  If you want to control it, you'd want [^\n] for all but newline.  You'd want to start from the symbol (something unique) and then just match the output you expect.  If the label is uncontrolled (L435), don't do that, but if it is something like L_METADATA_CLASS_T, then it should be safe until we alter the name and have to update the testcase.

> Ok to commit ?

Ok.  I'll pre-approve adding scan to the testcase, if you want, you don't have to.


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