#include <stdio.h>
void abend_proc ();
int main(void)
{
abend_proc();
return;
}
void abend_proc ()
{
printf("____abend_____ kita----");
exit(1);
}
〔リスト38〕noreturn属性を使用する例(test69.c)
#include <stdio.h>
void abend_proc () __attribute__ ((noreturn));
int main(void)
{
abend_proc();
return;
}
void abend_proc ()
{
printf("____abend_____ kita----");
exit(1);
}
|
.file "test68.c" .version "01.01" gcc2_compiled.: .section .rodata .LC0: .string "____abend_____ kita----" .text .align 4 .globl abend_proc .type abend_proc,@function abend_proc: pushl %ebp movl %esp,%ebp subl $8,%esp addl $-12,%esp pushl $.LC0 call printf addl $-12,%esp pushl $1 call exit .Lfe1: .size abend_proc,.Lfe1-abend_proc .align 4 .globl main .type main,@function main: pushl %ebp movl %esp,%ebp subl $8,%esp call abend_proc movl %ebp,%esp popl %ebp ret .Lfe2: .size main,.Lfe2-main .ident "GCC: (GNU) 2.95.3 20010315 (release)" |
#include <stdio.h>
void abend_proc () __attribute__ ((noreturn));
int main(void)
{
abend_proc();
return;
}
void abend_proc ()
{
printf("____abend_____ kita----");
exit(1);
}
|
.file "test69.c" .version "01.01" gcc2_compiled.: .section .rodata .LC0: .string "____abend_____ kita----" .text .align 4 .globl abend_proc .type abend_proc,@function abend_proc: pushl %ebp movl %esp,%ebp subl $8,%esp addl $-12,%esp pushl $.LC0 call printf addl $-12,%esp pushl $1 call exit .Lfe1: .size abend_proc,.Lfe1-abend_proc .align 4 .globl main .type main,@function main: pushl %ebp movl %esp,%ebp subl $8,%esp call abend_proc .Lfe2: .size main,.Lfe2-main .ident "GCC: (GNU) 2.95.3 20010315 (release)" |