encode-6.m

来自「linux下编程用 编译软件」· M 代码 · 共 23 行

M
23
字号
/* Test for graceful encoding of const-qualified fields and parameters.  *//* Author: Ziemowit Laski  <zlaski@apple.com>  *//* { dg-do compile } */struct Cxx {  const struct Cxx *next;};@interface ObjC {  const struct Cxx *obj;}- (ObjC *)initWithCxx: (struct Cxx *const)c and: (const struct Cxx *)d;@end@implementation ObjC- (ObjC *)initWithCxx: (struct Cxx *const)c and: (const struct Cxx *)d {  obj = d;  return self;}@end /* { dg-final { scan-assembler "@\[0-9\]+@0:\[0-9\]+r\\^{Cxx=\\^r{Cxx}}\[0-9\]+\\^r{Cxx}" } } */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?