OSDN Git Service

Delete junk comment.
[pf3gnuchains/gcc-fork.git] / gcc / c-pragma.c
index 9bb9266..886c67b 100644 (file)
@@ -15,22 +15,22 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with GNU CC; see the file COPYING.  If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
 
 #include <stdio.h>
 #include "config.h"
 #include "tree.h"
+#include "except.h"
+#include "function.h"
+#include "defaults.h"
+#include "c-pragma.h"
 
 #ifdef HANDLE_SYSV_PRAGMA
 
-/* Support #pragma weak by default if WEAK_ASM_OP is defined.  */
-#if !defined (HANDLE_PRAGMA_WEAK) && defined (WEAK_ASM_OP) && defined (SET_ASM_OP)
-#define HANDLE_PRAGMA_WEAK 1
-#endif
-
 /* When structure field packing is in effect, this variable is the
    number of bits to use as the maximum alignment.  When packing is not
-   in effect, this is zero. */
+   in effect, this is zero.  */
 
 extern int maximum_field_alignment;
 
@@ -45,20 +45,7 @@ handle_pragma_token (string, token)
      char *string;
      tree token;
 {
-  static enum pragma_state
-    {
-      ps_start,
-      ps_done,
-      ps_bad,
-      ps_weak,
-      ps_name,
-      ps_equals,
-      ps_value,
-      ps_pack,
-      ps_left,
-      ps_align,
-      ps_right
-      } state = ps_start, type;
+  static enum pragma_state state = ps_start, type;
   static char *name;
   static char *value;
   static int align;
@@ -76,24 +63,8 @@ handle_pragma_token (string, token)
        {
 #ifdef HANDLE_PRAGMA_WEAK
          if (HANDLE_PRAGMA_WEAK)
-           {
-             if (state == ps_name || state == ps_value)
-               {
-                 fprintf (asm_out_file, "\t%s\t", WEAK_ASM_OP);
-                 ASM_OUTPUT_LABELREF (asm_out_file, name);
-                 fputc ('\n', asm_out_file);
-                 if (state == ps_value)
-                   {
-                     fprintf (asm_out_file, "\t%s\t", SET_ASM_OP);
-                     ASM_OUTPUT_LABELREF (asm_out_file, name);
-                     fputc (',', asm_out_file);
-                     ASM_OUTPUT_LABELREF (asm_out_file, value);
-                     fputc ('\n', asm_out_file);
-                   }
-               }
-             else if (! (state == ps_done || state == ps_start))
-               warning ("malformed `#pragma weak'");
-           }
+           handle_pragma_weak (state, name, value);
+
 #endif /* HANDLE_PRAMA_WEAK */
        }