Changeset aea7168
- Timestamp:
- Aug 3, 2016, 11:21:56 AM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 73bf8cf2, a14187f, bee4283
- Parents:
- 9799ec8 (diff), e80ebe5 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/LaTeXmacros/common.tex
r9799ec8 raea7168 11 11 %% Created On : Sat Apr 9 10:06:17 2016 12 12 %% Last Modified By : Peter A. Buhr 13 %% Last Modified On : Mon Aug 1 09:11:20201614 %% Update Count : 22 513 %% Last Modified On : Tue Aug 2 17:02:02 2016 14 %% Update Count : 228 15 15 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 16 16 … … 40 40 \newcommand{\CC}{\rm C\kern-.1em\hbox{+\kern-.25em+}\xspace} % CC symbolic name 41 41 \newcommand{\CCeleven}{\rm C\kern-.1em\hbox{+\kern-.25em+}11\xspace} % C++11 symbolic name 42 \ def\c11{ISO/IEC C} % C11 name (cannot have numbers in latex command name)42 \newcommand{\Celeven}{C11\xspace} % C11 symbolic name 43 43 44 44 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -
doc/user/user.tex
r9799ec8 raea7168 11 11 %% Created On : Wed Apr 6 14:53:29 2016 12 12 %% Last Modified By : Peter A. Buhr 13 %% Last Modified On : Mon Aug 1 09:11:24201614 %% Update Count : 12 7113 %% Last Modified On : Tue Aug 2 17:39:02 2016 14 %% Update Count : 1286 15 15 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 16 16 … … 226 226 227 227 \section{Interoperability} 228 \label{s:Interoperability} 228 229 229 230 \CFA is designed to integrate well with existing C programs and libraries. … … 314 315 The \CFA compilation message is printed at the beginning of a compilation. 315 316 \textbf{This option is the default.} 317 318 \item 319 \Indexc{-no-include-std}\index{compilation option!-no-include-std@©-no-include-std©} 320 Do not supply ©extern "C"© wrappers for \Celeven standard include files (see~\VRef{s:StandardHeaders}). 321 \textbf{This option is \emph{not} the default.} 316 322 \end{description} 317 323 … … 4363 4369 4364 4370 4365 \section{New Keywowrds} 4366 4367 ©catch©, ©catchResume©, ©choose©, \quad ©disable©, ©dtype©, \quad ©enable©, \quad ©fallthrough©, ©fallthru©, ©finally©, ©forall©, ©ftype©, \quad ©lvalue©, \quad ©otype©, \quad ©throw©, ©throwResume©, ©trait©, ©try© 4371 \section{New Keywords} 4372 \label{s:NewKeywords} 4373 4374 \begin{quote2} 4375 \begin{tabular}{ll} 4376 ©catch© & ©lvalue© \\ 4377 ©catchResume© & \\ 4378 ©choose© & ©otype© \\ 4379 & \\ 4380 ©disable© & ©throw© \\ 4381 ©dtype© & ©throwResume© \\ 4382 & ©trait© \\ 4383 ©enable© & ©try© \\ 4384 & \\ 4385 ©fallthrough© \\ 4386 ©fallthru© \\ 4387 ©finally© \\ 4388 ©forall© \\ 4389 ©ftype© \\ 4390 \end{tabular} 4391 \end{quote2} 4392 4393 4394 \section{Standard Headers} 4395 \label{s:StandardHeaders} 4396 4397 C prescribes the following standard header-files: 4398 \begin{quote2} 4399 \begin{minipage}{\linewidth} 4400 \begin{tabular}{lll} 4401 assert.h & math.h & stdlib.h \\ 4402 complex.h & setjmp.h & stdnoreturn.h \\ 4403 ctype.h & signal.h & string.h \\ 4404 errno.h & stdalign.h & tgmath.h \\ 4405 fenv.h & stdarg.h & threads.h \\ 4406 float.h & stdatomic.h & time.h \\ 4407 inttypes.h & stdbool.h & uchar.h \\ 4408 iso646.h & stddef.h & wchar.h \\ 4409 limits.h & stdint.h & wctype.h \\ 4410 locale.h & stdio.h & unistd.h\footnote{\CFA extension} 4411 \end{tabular} 4412 \end{minipage} 4413 \end{quote2} 4414 For the prescribed head-files, \CFA implicit wraps their includes in an ©extern "C"©; 4415 hence, names in these include files are not mangled\index{mangling!name} (see~\VRef{s:Interoperability}). 4416 All other C header files must be explicitly wrapped in ©extern "C"© to prevent name mangling. 4368 4417 4369 4418 … … 4375 4424 \item 4376 4425 \begin{description} 4377 \item[Change:] add new keywords \\4426 \item[Change:] add new keywords (see~\VRef{s:NewKeywords}) \\ 4378 4427 New keywords are added to \CFA. 4379 4428 \item[Rationale:] keywords added to implement new semantics of \CFA. … … 4473 4522 \begin{description} 4474 4523 \item[Change:] have ©struct© introduce a scope for nested types 4475 In C, the name of the nested types belongs to the same scope as the name of the outermost enclosing 4524 In C, the name of the nested types belongs to the same scope as the name of the outermost enclosing 4476 4525 Example: 4477 4526 \begin{lstlisting} … … 4596 4645 %$ 4597 4646 \begin{lstlisting}[mathescape=off] 4598 sout | "x (" | 1 | "x [" | 2 | "x {" | 3 | "x $" | 4 | "x £" | 5 | "x ¥" | 6 | "x ¡" | 7 | "x ¿" | 8 | "x «" | 9 | endl; 4647 sout | "x (" | 1 | "x [" | 2 | "x {" | 3 | "x $" | 4 | "x £" | 5 | "x ¥" | 6 | "x ¡" | 7 4648 | "x ¿" | 8 | "x «" | 9 | endl; 4599 4649 \end{lstlisting} 4600 4650 %$ … … 4606 4656 A seperator does not appear after a C string ending with the (extended) \Index{ASCII}\index{ASCII!extended} characters: ©,.:;!?)]}%¢»© 4607 4657 \begin{lstlisting}[belowskip=0pt] 4608 sout | 1 | ", x" | 2 | ". x" | 3 | ": x" | 4 | "; x" | 5 | "! x" | 6 | "? x" | 7 | ") x" | 8 | "] x" | 9 | "} x"4609 | 10 | "% x" | 11 | "¢ x" | 12 | "» x" | endl;4658 sout | 1 | ", x" | 2 | ". x" | 3 | ": x" | 4 | "; x" | 5 | "! x" | 6 | "? x" | 7 4659 | ") x" | 8 | "] x" | 9 | "} x" | 10 | "% x" | 11 | "¢ x" | 12 | "» x" | endl; 4610 4660 \end{lstlisting} 4611 4661 \begin{lstlisting}[mathescape=off,showspaces=true,aboveskip=0pt,belowskip=0pt] … … 4623 4673 The following \CC-style \Index{manipulator}s allow further control over implicit seperation. 4624 4674 \begin{lstlisting}[mathescape=off,belowskip=0pt] 4625 sout | sepOn | 1 | 2 | 3 | sepOn | endl; // separator at start of line4675 sout | sepOn | 1 | 2 | 3 | sepOn | endl; §\C{// separator at start of line}§ 4626 4676 \end{lstlisting} 4627 4677 \begin{lstlisting}[mathescape=off,showspaces=true,aboveskip=0pt,belowskip=0pt] … … 4629 4679 \end{lstlisting} 4630 4680 \begin{lstlisting}[mathescape=off,aboveskip=0pt,belowskip=0pt] 4631 sout | 1 | sepOff | 2 | 3 | endl; // turn off implicit separator temporarily4681 sout | 1 | sepOff | 2 | 3 | endl; §\C{// turn off implicit separator temporarily}§ 4632 4682 \end{lstlisting} 4633 4683 \begin{lstlisting}[mathescape=off,showspaces=true,aboveskip=0pt,belowskip=0pt] … … 4635 4685 \end{lstlisting} 4636 4686 \begin{lstlisting}[mathescape=off,aboveskip=0pt,belowskip=0pt] 4637 sout | sepDisable | 1 | 2 | 3 | endl; // turn off implicit separation, affects all subsequent prints4687 sout | sepDisable | 1 | 2 | 3 | endl; §\C{// turn off implicit separation, affects all subsequent prints}§ 4638 4688 \end{lstlisting} 4639 4689 \begin{lstlisting}[mathescape=off,showspaces=true,aboveskip=0pt,belowskip=0pt] … … 4641 4691 \end{lstlisting} 4642 4692 \begin{lstlisting}[mathescape=off,aboveskip=0pt,belowskip=0pt] 4643 sout | 1 | sepOn | 2 | 3 | endl; // turn on implicit separator temporarily4693 sout | 1 | sepOn | 2 | 3 | endl; §\C{// turn on implicit separator temporarily}§ 4644 4694 \end{lstlisting} 4645 4695 \begin{lstlisting}[mathescape=off,showspaces=true,aboveskip=0pt,belowskip=0pt] … … 4647 4697 \end{lstlisting} 4648 4698 \begin{lstlisting}[mathescape=off,aboveskip=0pt,belowskip=0pt] 4649 sout | sepEnable | 1 | 2 | 3 | endl; // turn on implicit separation, affects all subsequent prints4699 sout | sepEnable | 1 | 2 | 3 | endl; §\C{// turn on implicit separation, affects all subsequent prints}§ 4650 4700 \end{lstlisting} 4651 4701 \begin{lstlisting}[mathescape=off,showspaces=true,aboveskip=0pt,belowskip=0pt] … … 4653 4703 \end{lstlisting} 4654 4704 \begin{lstlisting}[mathescape=off,aboveskip=0pt,aboveskip=0pt,belowskip=0pt] 4655 sepSet( sout, ", $" ); // change separator from " " to ", $"4705 sepSet( sout, ", $" ); §\C{// change separator from " " to ", \$"}§ 4656 4706 sout | 1 | 2 | 3 | endl; 4657 4707 \end{lstlisting} -
src/driver/cfa.cc
r9799ec8 raea7168 10 10 // Created On : Tue Aug 20 13:44:49 2002 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T hu Jul 7 08:56:01 201613 // Update Count : 14 412 // Last Modified On : Tue Aug 2 12:23:11 2016 13 // Update Count : 147 14 14 // 15 15 … … 87 87 bool cpp_flag = false; // -E or -M flag, preprocessor only 88 88 bool std_flag = false; // -std= flag 89 bool noincstd_flag = false; // -no-include-std= flag 89 90 bool debugging __attribute(( unused )) = false; // -g flag 90 91 … … 144 145 } else if ( arg == "-nohelp" ) { 145 146 help = false; // strip the nohelp flag 147 } else if ( arg == "-no-include-std" ) { 148 noincstd_flag = true; // strip the no-include-std flag 146 149 } else if ( arg == "-compiler" ) { 147 150 // use the user specified compiler … … 248 251 args[nargs] = "-I" CFA_INCDIR; 249 252 nargs += 1; 250 args[nargs] = "-I" CFA_INCDIR "/stdhdr"; 251 nargs += 1; 253 if ( ! noincstd_flag ) { // do not use during build 254 args[nargs] = "-I" CFA_INCDIR "/stdhdr"; 255 nargs += 1; 256 } // if 252 257 args[nargs] = "-I" CFA_INCDIR "/containers"; 253 258 nargs += 1; -
src/libcfa/Makefile.am
r9799ec8 raea7168 11 11 ## Created On : Sun May 31 08:54:01 2015 12 12 ## Last Modified By : Peter A. Buhr 13 ## Last Modified On : Fri Jul 8 23:05:11201614 ## Update Count : 19 213 ## Last Modified On : Tue Aug 2 12:17:23 2016 14 ## Update Count : 196 15 15 ############################################################################### 16 16 … … 26 26 # create extra forward types/declarations to reduce inclusion of library files 27 27 extras.cf : extras.regx extras.c 28 $ (AM_V_GEN)@BACKEND_CC@ @CFA_FLAGS@ -E ${srcdir}/extras.c | grep -f extras.regx > ${srcdir}/extras.cf28 ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -E ${srcdir}/extras.c | grep -f extras.regx > ${srcdir}/extras.cf 29 29 30 30 # create forward declarations for gcc builtins 31 31 builtins.cf : builtins.c 32 $ (AM_V_GEN)if [ -e $< ] ; then \32 ${AM_V_GEN}if [ -e $< ] ; then \ 33 33 @BACKEND_CC@ -E -P $^ | sed -e "/targetm/s/.*//" -e "/_Decimal/s/.*//" -e "s/void (const char \*)0();//" -e "s/\"//g" -e "s/\(__builtin_\) /\1/" > $@ ; \ 34 34 fi 35 35 36 36 builtins.c : builtins.def prototypes.awk 37 $ (AM_V_GEN)if [ -e $< ] ; then \37 ${AM_V_GEN}if [ -e $< ] ; then \ 38 38 @BACKEND_CC@ -E prototypes.c | awk -f prototypes.awk > $@ ; \ 39 39 fi … … 48 48 49 49 libcfa-prelude.c : ${srcdir}/prelude.cf ${srcdir}/extras.cf ${srcdir}/builtins.cf 50 $ (AM_V_GEN)${abs_top_srcdir}/src/driver/cfa-cpp -l ${srcdir}/prelude.cf $@ # use src/cfa-cpp as not in lib until after install50 ${AM_V_GEN}${abs_top_srcdir}/src/driver/cfa-cpp -l ${srcdir}/prelude.cf $@ # use src/cfa-cpp as not in lib until after install 51 51 52 52 libcfa-prelude.o : libcfa-prelude.c 53 $ (AM_V_GEN)@BACKEND_CC@ @CFA_FLAGS@ -c -o $@ $<53 ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -c -o $@ $< 54 54 55 CFLAGS = -quiet - g -Wall -Wno-unused-function @CFA_FLAGS@ -B${abs_top_srcdir}/src/driver -XCFA -t # TEMPORARY: does not build with -O255 CFLAGS = -quiet -no-include-std -g -Wall -Wno-unused-function @CFA_FLAGS@ -B${abs_top_srcdir}/src/driver -XCFA -t # TEMPORARY: does not build with -O2 56 56 CC = ${abs_top_srcdir}/src/driver/cfa 57 57 … … 63 63 @true 64 64 65 ${libobjs} : ${abs_top_srcdir}/src/driver/cfa-cpp ${cfalib_DATA} 65 ${libobjs} : ${abs_top_srcdir}/src/driver/cfa-cpp ${cfalib_DATA} # add dependency to cfa-cpp so all libraries are rebuilt with new translator 66 66 67 67 libcfa_a_SOURCES = libcfa-prelude.c ${headers:=.c} -
src/libcfa/Makefile.in
r9799ec8 raea7168 136 136 CFA_LIBDIR = @CFA_LIBDIR@ 137 137 CFA_PREFIX = @CFA_PREFIX@ 138 CFLAGS = -quiet - g -Wall -Wno-unused-function @CFA_FLAGS@ -B${abs_top_srcdir}/src/driver -XCFA -t # TEMPORARY: does not build with -O2138 CFLAGS = -quiet -no-include-std -g -Wall -Wno-unused-function @CFA_FLAGS@ -B${abs_top_srcdir}/src/driver -XCFA -t # TEMPORARY: does not build with -O2 139 139 CPP = @CPP@ 140 140 CPPFLAGS = @CPPFLAGS@ … … 603 603 # create extra forward types/declarations to reduce inclusion of library files 604 604 extras.cf : extras.regx extras.c 605 $ (AM_V_GEN)@BACKEND_CC@ @CFA_FLAGS@ -E ${srcdir}/extras.c | grep -f extras.regx > ${srcdir}/extras.cf605 ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -E ${srcdir}/extras.c | grep -f extras.regx > ${srcdir}/extras.cf 606 606 607 607 # create forward declarations for gcc builtins 608 608 builtins.cf : builtins.c 609 $ (AM_V_GEN)if [ -e $< ] ; then \609 ${AM_V_GEN}if [ -e $< ] ; then \ 610 610 @BACKEND_CC@ -E -P $^ | sed -e "/targetm/s/.*//" -e "/_Decimal/s/.*//" -e "s/void (const char \*)0();//" -e "s/\"//g" -e "s/\(__builtin_\) /\1/" > $@ ; \ 611 611 fi 612 612 613 613 builtins.c : builtins.def prototypes.awk 614 $ (AM_V_GEN)if [ -e $< ] ; then \614 ${AM_V_GEN}if [ -e $< ] ; then \ 615 615 @BACKEND_CC@ -E prototypes.c | awk -f prototypes.awk > $@ ; \ 616 616 fi … … 623 623 624 624 libcfa-prelude.c : ${srcdir}/prelude.cf ${srcdir}/extras.cf ${srcdir}/builtins.cf 625 $ (AM_V_GEN)${abs_top_srcdir}/src/driver/cfa-cpp -l ${srcdir}/prelude.cf $@ # use src/cfa-cpp as not in lib until after install625 ${AM_V_GEN}${abs_top_srcdir}/src/driver/cfa-cpp -l ${srcdir}/prelude.cf $@ # use src/cfa-cpp as not in lib until after install 626 626 627 627 libcfa-prelude.o : libcfa-prelude.c 628 $ (AM_V_GEN)@BACKEND_CC@ @CFA_FLAGS@ -c -o $@ $<628 ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -c -o $@ $< 629 629 630 630 # extensionless header files are overridden by -o flag in default makerule => explicitly override default rule to silently do nothing … … 632 632 @true 633 633 634 ${libobjs} : ${abs_top_srcdir}/src/driver/cfa-cpp ${cfalib_DATA} 634 ${libobjs} : ${abs_top_srcdir}/src/driver/cfa-cpp ${cfalib_DATA} # add dependency to cfa-cpp so all libraries are rebuilt with new translator 635 635 636 636 maintainer-clean-local:
Note: See TracChangeset
for help on using the changeset viewer.