@@ -414,6 +414,7 @@ enum {
414
414
tNATIVE ,
415
415
tNEW ,
416
416
tOPERATOR ,
417
+ t__PRAGMA ,
417
418
tPUBLIC ,
418
419
tRETURN ,
419
420
tSIZEOF ,
@@ -585,6 +586,16 @@ enum { /* search types for error_suggest() when the identifier type is "estSYMB
585
586
esfVARCONST = esfCONST | esfVARIABLE | esfARRAY
586
587
};
587
588
589
+ enum { /* attribute flags for "__pragma" */
590
+ attrDEPRECATED ,
591
+ attrUNUSED ,
592
+ attrUNREAD ,
593
+ attrUNWRITTEN ,
594
+ attrNODESTRUCT ,
595
+ attrNAKED ,
596
+ NUM_ATTRS
597
+ };
598
+
588
599
/* interface functions */
589
600
#if defined __cplusplus
590
601
extern "C" {
@@ -673,6 +684,9 @@ SC_FUNC symbol *add_builtin_string_constant(char *name,const char *val,int vclas
673
684
SC_FUNC void exporttag (int tag );
674
685
SC_FUNC void sc_attachdocumentation (symbol * sym );
675
686
SC_FUNC void emit_parse_line (void );
687
+ SC_FUNC void pragma_deprecated (symbol * sym );
688
+ SC_FUNC void pragma_unused (symbol * sym ,int unread ,int unwritten );
689
+ SC_FUNC void pragma_nodestruct (symbol * sym );
676
690
677
691
/* function prototypes in SC2.C */
678
692
#define PUSHSTK_P (v ) { stkitem s_; s_.pv=(v); pushstk(s_); }
@@ -974,6 +988,7 @@ SC_VDECL int pc_recursion; /* enable detailed recursion report? */
974
988
SC_VDECL int pc_retexpr ; /* true if the current expression is a part of a "return" statement */
975
989
SC_VDECL int pc_retheap ; /* heap space (in bytes) to be manually freed when returning an array returned by another function */
976
990
SC_VDECL int pc_nestlevel ; /* number of active (open) compound statements */
991
+ SC_VDECL unsigned int pc_attributes ;/* currently set attribute flags (for the "__pragma" operator) */
977
992
978
993
SC_VDECL constvalue_root sc_automaton_tab ; /* automaton table */
979
994
SC_VDECL constvalue_root sc_state_tab ; /* state table */
0 commit comments