Skip to content

Commit

Permalink
Remove _Alignas from list of unsupported features in README
Browse files Browse the repository at this point in the history
  • Loading branch information
noahmartinwilliams committed Nov 11, 2024
1 parent 9bcd58f commit 5e49574
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 2 deletions.
66 changes: 66 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
= Language.C =

Language.C is a parser and pretty-printer framework for C11 and the extensions of gcc.

See http://visq.github.io/language-c/

== Build and Install ==

cabal install

-- or --

runhaskell Setup.hs configure FLAGS
runhaskell Setup.hs build
runhaskell Setup.hs install

Provide the set of flags passing
--flags="<flags-seperated-by-space>"
to configure.

== Compatibility ==

Tested with GHC 8.0, 8.2, 8.4, 8.6, 8.8 and 8.10

It is recommended to use the most recent platform release: http://hackage.haskell.org/platform/.

== C Language Compatibility ==

Currently unsupported C11 constructs:
- static assertion 6.7.10 (_Static_assert)
- generic selection 6.5.1.1 (_Generic)
- _Atomic, _Thread_local
- Universal character names

Currently unsupported GNU C extensions:
- __auto_type
- __builtin_offsetof
char a[__builtin_offsetof (struct S, sa->f)
- _Decimal32
- Extended assembler
__asm__ __volatile__ ("" : : : );
__asm__ goto ("" : : : : label);
- __attribute__((packed)): types featuring this attribute may have an
incorrect size or alignment calculated.

IEC 60559:
Since language-c-0.8, extended floating point types are supported (gcc 7 feature). Package maintainers may decide to disable these types (flag iecFpExtension) to work around the fact that the _Float128 type is redefined by glibc >= 2.26 if gcc < 7 is used for preprocessing:
/* The type _Float128 exists only since GCC 7.0. */
# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
typedef __float128 _Float128;
# endif

== Sources ==

see src/README

== Examples ==

A couple of small examples are available in /examples

== Testing ==

A couple of regression tests can be run via
> cd test/harness; make

For more tests, see test/README.
4 changes: 2 additions & 2 deletions src/Language/C/Parser/Parser.y
Original file line number Diff line number Diff line change
Expand Up @@ -1147,8 +1147,8 @@ struct_declaration_list :: { Reversed [CDecl] }
struct_declaration_list
: {- empty -} { RList.empty }
| struct_declaration_list ';' { $1 }
| struct_declaration_list struct_declaration { $1 `snoc` ( if ( containsAlign $1 ) then ( addAlign $2 ( getAlign $1 ) ) else $2 ) }
| struct_declaration_list alignment_specifier struct_declaration { $1 `snoc` ( addAlign $3 $2 )}
| struct_declaration_list struct_declaration { $1 `RList.snoc` ( if ( containsAlign $1 ) then ( addAlign $2 ( getAlign $1 ) ) else $2 ) }
| struct_declaration_list alignment_specifier struct_declaration { $1 `RList.snoc` ( addAlign $3 $2 )}


-- parse C structure declaration (C99 6.7.2.1)
Expand Down

0 comments on commit 5e49574

Please sign in to comment.