summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/980825-1.c
blob: 34e35bf83c4c4880178c8989408b4636809f4a36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
typedef enum { FALSE, TRUE } boolean;
enum _errorTypes { FATAL = 1, WARNING = 2, PERROR = 4 };
typedef struct _optionValues {
    struct _include {		 
	boolean	classNames;	 
	boolean	defines;	 
	boolean	enumerators;	 
    } include;
} optionValues;
extern optionValues	Option;
static void applyTagInclusionList( list )
    const char *const list;
{
    boolean mode = TRUE;	 
    const char *p;
    for (p = list  ;  *p != '\0'  ;  ++p)
	switch (*p)
	{
	    case '=':	 
		clearTagList();
		mode = TRUE;
		break;
	    case '+':	mode = TRUE;	break;	 
	    case '-':	mode = FALSE;	break;	 
	    case 'c':	Option.include.classNames	= mode;		break;
	    case 'd':	Option.include.defines		= mode;		break;
	    case 'e':	Option.include.enumerators	= mode;		break;
	    default: error(FATAL, "-i: Invalid tag option '%c'", *p);	break;
	}
}