egcs-980315 bug report with patch

David C Binderman dcb@pncl.co.uk
Sun Mar 22 12:55:00 GMT 1998


Hello there,

My reading of K&R 2, page 245 suggests that 'L' is a permitted
character in a % specifier.

The following patch for egcs-980315 makes what I beleive to be a
suitable change.

I've also taken the liberty of fixing a case of
"might be used initialised" warning msg.


./gcc/c-common.c
*** ./gcc/c-common.c	Wed Feb 18 10:38:43 1998
--- ../egcs-980315.dcb/./gcc/c-common.c	Sun Feb 22 18:31:10 1998
***************
*** 393,400 ****
  decl_attributes (node, attributes, prefix_attributes)
       tree node, attributes, prefix_attributes;
  {
!   tree decl = 0, type;
!   int is_type;
    tree a;

    if (attrtab_idx == 0)
--- 393,400 ----
  decl_attributes (node, attributes, prefix_attributes)
       tree node, attributes, prefix_attributes;
  {
!   tree decl = 0, type = 0;
!   int is_type = 0;
    tree a;

    if (attrtab_idx == 0)
***************
*** 1462,1468 ****
        else if (*format_chars == 'q' || *format_chars == 'L')
  	{
  	  length_char = *format_chars++;
! 	  if (pedantic)
  	    pedwarn ("ANSI C does not support the `%c' length modifier",
  		     length_char);
  	}
--- 1462,1468 ----
        else if (*format_chars == 'q' || *format_chars == 'L')
  	{
  	  length_char = *format_chars++;
! 	  if (length_char == 'q')
  	    pedwarn ("ANSI C does not support the `%c' length modifier",
  		     length_char);
  	}

David Binderman MSc BSc    +44 1293 534 847       dcb_AVOID_JUNK_MAIL@pncl.co.uk
There is no substitute for skill, taste and experience when programming
 - Dr Stroustrup, inventor of C++




More information about the Gcc-bugs mailing list