source: tests/quotedKeyword.cfa @ 011c29e

Last change on this file since 011c29e was aca0d2f, checked in by Peter A. Buhr <pabuhr@…>, 21 months ago

make anonymous struct declaration static

  • Property mode set to 100644
File size: 1.8 KB
RevLine 
[c6b1105]1//
2// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
3//
4// The contents of this file are covered under the licence agreement in the
5// file "LICENCE" distributed with Cforall.
6//
[dc8511c]7// quotedKeyword.cfa -- test quoted keyword usage
[c6b1105]8//
9// Author           : Peter A. Buhr
10// Created On       : Wed May 27 17:56:53 2015
11// Last Modified By : Peter A. Buhr
[aca0d2f]12// Last Modified On : Thu Feb 23 20:31:05 2023
13// Update Count     : 26
[c6b1105]14//
15
[73abe95]16#include <fstream.hfa>
[c6b1105]17
[aca0d2f]18static struct {
[095ac99]19        int ``otype;
20        int ``struct;
[c6b1105]21} st = { 10, 10 };
22
[095ac99]23typedef int ``forall;
24``forall xxx = 10;
[c6b1105]25
[095ac99]26int ``_Alignas, ``_Alignof, ``__alignof, ``__alignof__, ``asm, ``__asm, ``__asm__, ``_At, ``_Atomic, ``__attribute,
27        ``__attribute__, ``auto, ``_Bool, ``break, ``case, ``catch, ``catchResume, ``char, ``choose, ``_Complex, ``__complex,
28        ``__complex__, ``const, ``__const, ``__const__, ``continue, ``default, ``disable, ``do, ``double, ``dtype, ``else,
29        ``enable, ``enum, ``__extension__, ``extern, ``fallthru, ``finally, ``float, ``__float128, ``for, ``forall, ``fortran,
30        ``ftype, ``_Generic, ``goto, ``if, ``_Imaginary, ``__imag, ``__imag__, ``inline, ``__inline, ``__inline__, ``int,
31        ``__int128, ``__label__, ``long, ``lvalue, ``_Noreturn, ``__builtin_offsetof, ``otype, ``register, ``restrict,
32        ``__restrict, ``__restrict__, ``return, ``short, ``signed, ``__signed, ``__signed__, ``sizeof, ``static,
[64af7ac]33        ``_Static_assert, ``struct, ``switch, ``_thread, ``_Thread_local, ``throw, ``throwResume, ``trait, ``try, ``typedef,
[095ac99]34        ``typeof, ``__typeof, ``__typeof__, ``union, ``unsigned, ``__builtin_va_list, ``void, ``volatile, ``__volatile,
35        ``__volatile__, ``while;
[c6b1105]36
37int main() {
[095ac99]38        int ``if = 0;
39        ``catch = 1;
40        st.``otype = 2;
41        st.``struct = 3;
42        ``throw = 4;
43        sout | ``catch + st.``otype + st.``struct + ``throw;
[c6b1105]44}
45
46// Local Variables: //
47// tab-width: 4 //
[dc8511c]48// compile-command: "cfa quotedKeyword.cfa" //
[c6b1105]49// End: //
Note: See TracBrowser for help on using the repository browser.