public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [patch] Fix or1k gcc-4.9 -m32 compilation error
@ 2014-06-09 19:03 Jan Kratochvil
  2014-06-09 19:44 ` Maciej W. Rozycki
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Kratochvil @ 2014-06-09 19:03 UTC (permalink / raw)
  To: binutils

Hi,

Fedora Rawhide i686 (32-bit)
gcc-4.9.0-8.fc21.i686
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I. -I. -I../bfd -I./../include -I./../bfd -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g3 -pipe -Wall -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -ftrack-macro-expansion=0 -fno-diagnostics-show-caret -fsanitize=address -MT or1k-asm.lo -MD -MP -MF .deps/or1k-asm.Tpo -c or1k-asm.c -o or1k-asm.o
In file included from or1k-asm.c:34:0:
or1k-desc.h:260:73: error: this decimal constant is unsigned only in ISO C90 [-Werror]
or1k-desc.h:263:73: error: this decimal constant is unsigned only in ISO C90 [-Werror]
or1k-desc.h:270:4: error: this decimal constant is unsigned only in ISO C90 [-Werror]
cc1: all warnings being treated as errors
make[4]: *** [or1k-asm.lo] Error 1

OK to check it in?


Thanks,
Jan


opcodes/
2014-06-09  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* or1k-desc.h (SPR_FIELD_MASK_SYS_VR_VER, SPR_FIELD_MASK_SYS_UPR_CUP)
	(SPR_FIELD_MASK_SYS_SR_CID): Add U suffix.

diff --git a/opcodes/or1k-desc.h b/opcodes/or1k-desc.h
index d27872f..1cf2a90 100644
--- a/opcodes/or1k-desc.h
+++ b/opcodes/or1k-desc.h
@@ -257,17 +257,17 @@ typedef enum spr_field_lsbs {
 
 /* Enum declaration for SPR field masks.  */
 typedef enum spr_field_masks {
-  SPR_FIELD_MASK_SYS_VR_REV = 63, SPR_FIELD_MASK_SYS_VR_CFG = 16711680, SPR_FIELD_MASK_SYS_VR_VER = 4278190080, SPR_FIELD_MASK_SYS_UPR_UP = 1
+  SPR_FIELD_MASK_SYS_VR_REV = 63, SPR_FIELD_MASK_SYS_VR_CFG = 16711680, SPR_FIELD_MASK_SYS_VR_VER = 4278190080U, SPR_FIELD_MASK_SYS_UPR_UP = 1
  , SPR_FIELD_MASK_SYS_UPR_DCP = 2, SPR_FIELD_MASK_SYS_UPR_ICP = 4, SPR_FIELD_MASK_SYS_UPR_DMP = 8, SPR_FIELD_MASK_SYS_UPR_MP = 16
  , SPR_FIELD_MASK_SYS_UPR_IMP = 32, SPR_FIELD_MASK_SYS_UPR_DUP = 64, SPR_FIELD_MASK_SYS_UPR_PCUP = 128, SPR_FIELD_MASK_SYS_UPR_PICP = 256
- , SPR_FIELD_MASK_SYS_UPR_PMP = 512, SPR_FIELD_MASK_SYS_UPR_TTP = 1024, SPR_FIELD_MASK_SYS_UPR_CUP = 4278190080, SPR_FIELD_MASK_SYS_CPUCFGR_NSGR = 15
+ , SPR_FIELD_MASK_SYS_UPR_PMP = 512, SPR_FIELD_MASK_SYS_UPR_TTP = 1024, SPR_FIELD_MASK_SYS_UPR_CUP = 4278190080U, SPR_FIELD_MASK_SYS_CPUCFGR_NSGR = 15
  , SPR_FIELD_MASK_SYS_CPUCFGR_CGF = 16, SPR_FIELD_MASK_SYS_CPUCFGR_OB32S = 32, SPR_FIELD_MASK_SYS_CPUCFGR_OB64S = 64, SPR_FIELD_MASK_SYS_CPUCFGR_OF32S = 128
  , SPR_FIELD_MASK_SYS_CPUCFGR_OF64S = 256, SPR_FIELD_MASK_SYS_CPUCFGR_OV64S = 512, SPR_FIELD_MASK_SYS_CPUCFGR_ND = 1024, SPR_FIELD_MASK_SYS_SR_SM = 1
  , SPR_FIELD_MASK_SYS_SR_TEE = 2, SPR_FIELD_MASK_SYS_SR_IEE = 4, SPR_FIELD_MASK_SYS_SR_DCE = 8, SPR_FIELD_MASK_SYS_SR_ICE = 16
  , SPR_FIELD_MASK_SYS_SR_DME = 32, SPR_FIELD_MASK_SYS_SR_IME = 64, SPR_FIELD_MASK_SYS_SR_LEE = 128, SPR_FIELD_MASK_SYS_SR_CE = 256
  , SPR_FIELD_MASK_SYS_SR_F = 512, SPR_FIELD_MASK_SYS_SR_CY = 1024, SPR_FIELD_MASK_SYS_SR_OV = 2048, SPR_FIELD_MASK_SYS_SR_OVE = 4096
  , SPR_FIELD_MASK_SYS_SR_DSX = 8192, SPR_FIELD_MASK_SYS_SR_EPH = 16384, SPR_FIELD_MASK_SYS_SR_FO = 32768, SPR_FIELD_MASK_SYS_SR_SUMRA = 65536
- , SPR_FIELD_MASK_SYS_SR_CID = 4026531840, SPR_FIELD_MASK_SYS_FPCSR_FPEE = 1, SPR_FIELD_MASK_SYS_FPCSR_RM = 6, SPR_FIELD_MASK_SYS_FPCSR_OVF = 8
+ , SPR_FIELD_MASK_SYS_SR_CID = 4026531840U, SPR_FIELD_MASK_SYS_FPCSR_FPEE = 1, SPR_FIELD_MASK_SYS_FPCSR_RM = 6, SPR_FIELD_MASK_SYS_FPCSR_OVF = 8
  , SPR_FIELD_MASK_SYS_FPCSR_UNF = 16, SPR_FIELD_MASK_SYS_FPCSR_SNF = 32, SPR_FIELD_MASK_SYS_FPCSR_QNF = 64, SPR_FIELD_MASK_SYS_FPCSR_ZF = 128
  , SPR_FIELD_MASK_SYS_FPCSR_IXF = 256, SPR_FIELD_MASK_SYS_FPCSR_IVF = 512, SPR_FIELD_MASK_SYS_FPCSR_INF = 1024, SPR_FIELD_MASK_SYS_FPCSR_DZF = 2048
 } SPR_FIELD_MASKS;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch] Fix or1k gcc-4.9 -m32 compilation error
  2014-06-09 19:03 [patch] Fix or1k gcc-4.9 -m32 compilation error Jan Kratochvil
@ 2014-06-09 19:44 ` Maciej W. Rozycki
  2014-06-11  4:19   ` Stefan Kristiansson
  0 siblings, 1 reply; 3+ messages in thread
From: Maciej W. Rozycki @ 2014-06-09 19:44 UTC (permalink / raw)
  To: Jan Kratochvil, Stefan Kristiansson; +Cc: binutils

On Mon, 9 Jun 2014, Jan Kratochvil wrote:

> Fedora Rawhide i686 (32-bit)
> gcc-4.9.0-8.fc21.i686
> libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I. -I. -I../bfd -I./../include -I./../bfd -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g3 -pipe -Wall -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -ftrack-macro-expansion=0 -fno-diagnostics-show-caret -fsanitize=address -MT or1k-asm.lo -MD -MP -MF .deps/or1k-asm.Tpo -c or1k-asm.c -o or1k-asm.o
> In file included from or1k-asm.c:34:0:
> or1k-desc.h:260:73: error: this decimal constant is unsigned only in ISO C90 [-Werror]
> or1k-desc.h:263:73: error: this decimal constant is unsigned only in ISO C90 [-Werror]
> or1k-desc.h:270:4: error: this decimal constant is unsigned only in ISO C90 [-Werror]
> cc1: all warnings being treated as errors
> make[4]: *** [or1k-asm.lo] Error 1
> 
> OK to check it in?
> 
> 
> Thanks,
> Jan
> 
> 
> opcodes/
> 2014-06-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
> 
> 	* or1k-desc.h (SPR_FIELD_MASK_SYS_VR_VER, SPR_FIELD_MASK_SYS_UPR_CUP)
> 	(SPR_FIELD_MASK_SYS_SR_CID): Add U suffix.

 First, this is a generated file, your change will go away the next time 
the maintainer regenerates it.  Second, it's been discussed to death 
recently and a conclusion made this needs to be fixed in CGEN even rather 
than the template this file has been made from before it is regenerated.  

 I don't know what happened to the fix -- Stefan, any progress on that?

  Maciej

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch] Fix or1k gcc-4.9 -m32 compilation error
  2014-06-09 19:44 ` Maciej W. Rozycki
@ 2014-06-11  4:19   ` Stefan Kristiansson
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Kristiansson @ 2014-06-11  4:19 UTC (permalink / raw)
  To: Maciej W. Rozycki; +Cc: Jan Kratochvil, binutils

On Mon, Jun 9, 2014 at 10:43 PM, Maciej W. Rozycki
<macro@codesourcery.com> wrote:
>
>  First, this is a generated file, your change will go away the next time
> the maintainer regenerates it.  Second, it's been discussed to death
> recently and a conclusion made this needs to be fixed in CGEN even rather
> than the template this file has been made from before it is regenerated.
>
>  I don't know what happened to the fix -- Stefan, any progress on that?
>

I presented two patches, one that adds the 'U' suffix to only the
related constants (as the patch in this thread does)
https://sourceware.org/ml/cgen/2014-q2/msg00008.html
and one that adds the 'U' suffix to all enum constants.
https://sourceware.org/ml/cgen/2014-q2/msg00017.html

However, Frank was still worried that the 'U' suffix would cause
problems and was inclined to use a cast to (int) prefix instead.
https://sourceware.org/ml/cgen/2014-q2/msg00018.html

Changing the patch to do a cast to (int) isn't as straight forward as
it seems and I haven't got around to do that.

Stefan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-06-11  4:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-09 19:03 [patch] Fix or1k gcc-4.9 -m32 compilation error Jan Kratochvil
2014-06-09 19:44 ` Maciej W. Rozycki
2014-06-11  4:19   ` Stefan Kristiansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).