Skip to content
  • Xavier Leroy's avatar
    Ignore and warn about pragmas inside functions · 35e2b11d
    Xavier Leroy authored
    Pragmas can occur either outside external declarations, at the top level
    of a compilation unit, or within a compound statement, inside a function
    definition.
    
    The parse tree in cparse/C.mli cannot represent pragmas occuring within
    a compound statement.
    
    In this case, the elaborator used to silently move the pragma to top
    level, just before the function definition where the pragma occurs.
    
    It looks safer to just ignore pragmas occurring inside a function
    definition, and emit a specific warning.
    35e2b11d