const-str-9.m

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

M
21
字号
/* Test if ObjC constant strings get placed in the correct section.  *//* Contributed by Ziemowit Laski <zlaski@apple.com>  *//* { dg-options "-fnext-runtime" } *//* { dg-do compile { target *-*-darwin* } } */#include <objc/Object.h>@interface NSConstantString: Object {  char *cString;  unsigned int len;}@endextern struct objc_class _NSConstantStringClassReference;static const NSConstantString *appKey = @"MyApp";/* { dg-final { scan-assembler ".section __OBJC, __cstring_object" } } *//* { dg-final { scan-assembler ".long\t__NSConstantStringClassReference\n\t.long\t.*\n\t.long\t5\n\t.data" } } */

⌨️ 快捷键说明

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