aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/i370/i370-c.c
blob: d2344bc0108d7e5e3a91d5f1cad609b5088c5bf0 (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/* Subroutines for the C front end for System/370.
   Copyright (C) 1989, 1993, 1995, 1997, 1998, 1999, 2000
   Free Software Foundation, Inc.
   Contributed by Jan Stein (jan@cd.chalmers.se).
   Modified for OS/390 LanguageEnvironment C by Dave Pitts (dpitts@cozx.com)
   Hacked for Linux-ELF/390 by Linas Vepstas (linas@linas.org) 

This file is part of GNU CC.

GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.

GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING.  If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.  */

#include "config.h"
#include "system.h"
#include "tree.h"
#include "toplev.h"
#include "cpplib.h"
#include "c-pragma.h"
#include "i370-protos.h"

#ifdef TARGET_HLASM

/* #pragma map (name, alias) -
   In this implementation both name and alias are required to be
   identifiers.  The older code seemed to be more permissive.  Can
   anyone clarify?  */

void
i370_pr_map (pfile)
     cpp_reader *pfile ATTRIBUTE_UNUSED;
{
  tree name, alias, x;

  if (c_lex (&x)        == CPP_OPEN_PAREN
      && c_lex (&name)  == CPP_NAME
      && c_lex (&x)     == CPP_COMMA
      && c_lex (&alias) == CPP_NAME
      && c_lex (&x)     == CPP_CLOSE_PAREN)
    {
      if (c_lex (&x) != CPP_EOF)
	warning ("junk at end of #pragma map");

      mvs_add_alias (IDENTIFIER_POINTER (name), IDENTIFIER_POINTER (alias), 1);
      return;
    }

  warning ("malformed #pragma map, ignored");
}

#endif