2015-01-15 06:51:17 +01:00
|
|
|
#!/usr/bin/perl
|
|
|
|
|
|
|
|
use warnings;
|
|
|
|
use strict;
|
|
|
|
|
|
|
|
package c99;
|
2015-01-15 10:21:18 +01:00
|
|
|
use parent '_c_base';
|
2015-01-15 06:51:17 +01:00
|
|
|
|
|
|
|
sub initialize {
|
|
|
|
my ($self, %conf) = @_;
|
|
|
|
|
|
|
|
$self->{sourcefile} = 'prog.c';
|
|
|
|
$self->{execfile} = 'prog';
|
2015-07-12 11:54:08 +02:00
|
|
|
$self->{default_options} = '-Wextra -Wall -Wno-unused -pedantic -Wfloat-equal -Wshadow -std=c99 -lm -Wfatal-errors -fsanitize=alignment,undefined';
|
2015-01-17 13:41:50 +01:00
|
|
|
$self->{options_paste} = '-fdiagnostics-show-caret';
|
|
|
|
$self->{options_nopaste} = '-fno-diagnostics-show-caret';
|
2015-07-17 09:33:04 +02:00
|
|
|
$self->{cmdline} = 'gcc -ggdb -g3 $sourcefile $options -o $execfile';
|
2015-01-15 06:51:17 +01:00
|
|
|
|
|
|
|
$self->{prelude} = <<'END';
|
|
|
|
#define _XOPEN_SOURCE 9001
|
|
|
|
#define __USE_XOPEN
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <complex.h>
|
|
|
|
#include <math.h>
|
|
|
|
#include <tgmath.h>
|
|
|
|
#include <limits.h>
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <stdarg.h>
|
|
|
|
#include <ctype.h>
|
|
|
|
#include <inttypes.h>
|
|
|
|
#include <float.h>
|
|
|
|
#include <errno.h>
|
|
|
|
#include <time.h>
|
|
|
|
#include <assert.h>
|
|
|
|
#include <locale.h>
|
|
|
|
#include <wchar.h>
|
|
|
|
#include <fenv.h>
|
2015-01-17 14:00:07 +01:00
|
|
|
#include <iso646.h>
|
2015-01-15 06:51:17 +01:00
|
|
|
#include <setjmp.h>
|
|
|
|
#include <signal.h>
|
|
|
|
#include <prelude.h>
|
|
|
|
|
|
|
|
END
|
|
|
|
}
|
|
|
|
|
|
|
|
1;
|