LoginSignup
0
0

N2731
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2731.pdf

N2731, 3.14 memory location
https://researchmap.jp/blogs/blog_entries/view/82322/acf79571910fc36d484a3a2ae81b5934?frame_id=445675
https://researchmap.jp/jo7bhb629-1797580/#_1797580
original:
https://github.com/Clanguagesubset/c2011/wiki

N27311-3-14.c
// 1 filename:N2731-3-14-ex.
//ver 0.1 December.29, 2013, N1570
// http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf 
//ver0.2 January 11, 2014 add 2 sets of inputs for clarify about warning and assignment. https://qiita.com/kaizen_nagoya/items/e4eafb04e14dbf580a62
// ver. 0.3 Nobemver 25, 2021, N2731
// http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2731.pdf
// 2 original examples and/or notes:
// (c) ISO/IEC JTC1 SC22 WG14 N1570, April 12, 2011
// (c) ISO/IEC JTC1 SC22 WG14 N2731, October 18, 2021
char * st = "N2731 3.14 memory location";
//
// 3 compile and output mechanism:
//(c)   Dr. Kiyoshi Ogawa, ka, Novenber.25, 2021
//
// 4 compile errors and/or wornings:
//Command/Options: gcc std=c2x -Wall n2731-3-14.c 
//
// 5. Hardware:  MacBook Pro, 
//(c) Intel http://ark.intel.com/products/37006/
//Core 2 Duo 2.53GHz, 8GB, 1067MHz DDR3
//
// 6. Special Thanks: Upper organizatios and 
//ISO/IEC JTC1 SC22 WG14, http://www.open-std.org/jtc1/sc22/wg14/www/standards
//ITSCJ/IPSJ http://www.itscj.ipsj.or.jp/itscj_english/index.html
//Daido University, http://www.daido.ac.jp/
//Spancion Inc., http://www.spansion.com/
//SWEST: Summer Workshop on Embedded System Technologies , http://swest.toppers.jp
//CEST: Consortium for Embedded System Technology, http://www.ertl.jp/CEST/
//OSC:Open Source Conference, http://www.ospn.jp/

#include <stdio.h>
//either an object of scalar type, or a maximal sequence of adjacent bit-fields all having nonzero width
// A structure declared as
struct {
char a;
int b:5, c:11,:0, d:8; 
struct { int ee:8; } e;
}
// contains four separate memory locations: The member a, and bit-fields d and e.ee are each separate memory locations, and can be modified concurrently without interfering with each other. The bit-fields b and c together constitute the fourth memory location. The bit-fields b and c cannot be concurrently modified, but b and a, for example, can be.

int main(void){
printf("%s¥n", st);
#endif
f.a = 1;
f.b = 2;
f.c = 3;
f.d = 4;
f.e.ee = 5;
printf(" %d %d %d %d %d\n", f.a,f.b,f.c,f.d,f.e.ee);
f.a = 1000001;
f.b = 2000002;
f.c = 3000003;
f.d = 4000004;
f.e.ee=5000005;
printf(" %d %d %d %d %d\n", f.a,f.b,f.c,f.d,f.e.ee);
f.a = 1000000000001;
f.b = 2000000000002;
f.c = 3000000000003;
f.d = 4000000000004;
f.e.ee=5000000000005;
printf("%d %d %d %d %d\n", f.a,f.b,f.c,f.d,f.e.ee);
}
// no error, no warning 
// output may be
// 3.14 memory location 
// 1 2 3 4 5
// 65 2 -317 4 69
// 1 2 3 4 5

C++ Support(0) 
https://qiita.com/kaizen_nagoya/items/8720d26f762369a80514

Coding Rules(0) C Secure , MISRA and so on
https://qiita.com/kaizen_nagoya/items/400725644a8a0e90fbb0

Ethernet 記事一覧 Ethernet(0)
https://qiita.com/kaizen_nagoya/items/88d35e99f74aefc98794

Wireshark 一覧 wireshark(0)、Ethernet(48)
https://qiita.com/kaizen_nagoya/items/fbed841f61875c4731d0

線網(Wi-Fi)空中線(antenna)(0) 記事一覧(118/300目標)
https://qiita.com/kaizen_nagoya/items/5e5464ac2b24bd4cd001

OSEK OS設計の基礎 OSEK(100)
https://qiita.com/kaizen_nagoya/items/7528a22a14242d2d58a3

Error一覧(C/C++, python, bash...) Error(0)
https://qiita.com/kaizen_nagoya/items/48b6cbc8d68eae2c42b8

なぜdockerで機械学習するか 書籍・ソース一覧作成中 (目標100)
https://qiita.com/kaizen_nagoya/items/ddd12477544bf5ba85e2

言語処理100本ノックをdockerで。python覚えるのに最適。:10+12
https://qiita.com/kaizen_nagoya/items/7e7eb7c543e0c18438c4

プログラムちょい替え(0)一覧:4件
https://qiita.com/kaizen_nagoya/items/296d87ef4bfd516bc394

TOPPERSまとめ #名古屋のIoTは名古屋のOSで
https://qiita.com/kaizen_nagoya/items/9026c049cb0309b9d451

docker(0) 資料集
https://qiita.com/kaizen_nagoya/items/45699eefd62677f69c1d

Qiita-dockerお宝鑑定団
https://qiita.com/kaizen_nagoya/items/509e125263559b5aed5b

The C++ Standard Library: clang++とg++でコンパイルしてみた(まとめ):14件
https://qiita.com/kaizen_nagoya/items/9bdfaa392443d13e5759

C++17 - The Complete Guide clang++とg++でコンパイルしてみた(まとめ):4件
https://qiita.com/kaizen_nagoya/items/c000f307e642990781e1

C++N3242, 2011, ISO/IEC 14882, C++ standard(1) Example code compile list
https://qiita.com/kaizen_nagoya/items/685b5c1a2c17c1bf1318

C++N4606 Working Draft 2016, ISO/IEC 14882, C++ standard(1) Example code compile list
https://qiita.com/kaizen_nagoya/items/df5d62c35bd6ed1c3d43/

C++N4741, 2018 Standard Working Draft on ISO/IEC 14882 sample code compile list
https://qiita.com/kaizen_nagoya/items/3294c014044550896010

C++N4910:2022 Standard Working Draft on ISO/IEC 14882(0) sample code compile list
https://qiita.com/kaizen_nagoya/items/fc957ddddd402004bb91

Autosar Guidelines C++14 example code compile list(1-169)
https://qiita.com/kaizen_nagoya/items/8ccbf6675c3494d57a76

プログラマによる、プログラマのための、統計と確率のプログラミングとその後 統計と確率一覧(0)
https://qiita.com/kaizen_nagoya/items/6e9897eb641268766909

プログラマが知っていると良い「公序良俗」
https://qiita.com/kaizen_nagoya/items/9fe7c0dfac2fbd77a945

一覧の一覧( The directory of directories of mine.) Qiita(100)
https://qiita.com/kaizen_nagoya/items/7eb0e006543886138f39

小川清最終講義、小川清最終講義(再)計画, Ethernet(100) 英語(100) 安全(100)
https://qiita.com/kaizen_nagoya/items/e2df642e3951e35e6a53

<この記事は個人の過去の経験に基づく個人の感想です。現在所属する組織、業務とは関係がありません。>
This article is an individual impression based on the individual's experience. It has nothing to do with the organization or business to which I currently belong.

文書履歴(document history)

最後までおよみいただきありがとうございました。

いいね 💚、フォローをお願いします。

Thank you very much for reading to the last sentence.

Please press the like icon 💚 and follow me for your happy life.

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0