/*
Copyright (C) 2007-2009, Parrot Foundation.
$Id: test_c.in 45410 2010-04-07 04:58:51Z petdance $

figure out if the compiler supports attributes.
see parrot/compiler.h for attribute value definitions.
*/

#include <stdio.h>
#include <stdlib.h>
#include "parrot/compiler.h"


__attribute__malloc__
__attribute__noreturn__
__attribute__warn_unused_result__
__attribute__deprecated__
void *
dummyfunc(const char *my_format, ...)
    __attribute__format__(printf, 1, 2)
    __attribute__nonnull__(1)
    ;


__attribute__const__
int
constfunc(int x);


__attribute__pure__
int
purefunc(int x);


__attribute__hot__
int
hotfunc(int x);


__attribute__cold__
int
coldfunc(int x);


static int
useless(void) { int x __attribute__unused__; return 0; }


/* as long as the file compiles, everything is okay */
int
main()
{
    return EXIT_SUCCESS;
}

/*
 * Local variables:
 *   c-file-style: "parrot"
 * End:
 * vim: expandtab shiftwidth=4:
 */
