source: tests/quotedKeyword.cfa @ d84f2ae

Last change on this file since d84f2ae was 10b5970, checked in by Michael Brooks <mlbrooks@…>, 2 weeks ago

Fix many test-suite- and libcfa-caused unused variable warnings.

In scope are easy fixes among tests whose sole warnings were unused variable. Reduces the wflags lax list by 40%.

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