]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
Remove mistakenly added file.
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
1807ffc1
MS
12015-09-03 Martin Sebor <msebor@redhat.com>
2
3 PR c/66516
4 * c/c-typeck.c (convert_arguments, parser_build_unary_op)
5 (build_conditional_expr, c_cast_expr, convert_for_assignment)
6 (build_binary_op, _objc_common_truthvalue_conversion): Call
7 reject_gcc_builtin.
8 (c_decl_implicit): Define.
9
d04ff417
MP
102015-09-02 Marek Polacek <polacek@redhat.com>
11
12 PR c/67432
13 * c-parser.c (c_parser_enum_specifier): Give a better error for
14 an empty enum.
15
a79683d5
TS
162015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
17
18 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
19
191a6b94
MP
202015-08-12 Marek Polacek <polacek@redhat.com>
21
22 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
23 LOC to it.
24
420a9d9b
MP
252015-08-03 Marek Polacek <polacek@redhat.com>
26
27 PR c/67088
28 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
29 Use it.
30 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
31
992118a1
PP
322015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
33
34 * c-parser.c (c_parser_if_body): Take token_indent_info
35 argument. Call warn_for_misleading_indentation even when the
36 body is a semicolon. Extract token_indent_infos corresponding
37 to the guard, body and next tokens. Adjust call to
38 warn_for_misleading_indentation accordingly.
39 (c_parser_else_body): Likewise.
40 (c_parser_if_statement): Likewise.
41 (c_parser_while_statement): Likewise.
42 (c_parser_for_statement): Likewise.
43
46308474
LFSM
442015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
45 Manuel López-Ibáñez <manu@gcc.gnu.org>
46
47 * c-decl.c (get_parm_info): Remove static var. Update warning
48 message.
49
05b28fd6
MP
502015-07-27 Marek Polacek <polacek@redhat.com>
51
52 PR c++/66555
53 PR c/54979
54 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
55
451b5e48
MP
562015-07-20 Marek Polacek <polacek@redhat.com>
57
58 PR c++/55095
59 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
60 (build_binary_op): Warn about left shift overflows.
61
1916bcb5
AM
622015-07-09 Andrew MacLeod <amacleod@redhat.com>
63
64 * c-array-notation.c: Adjust includes for flags.h changes.
65 * c-objc-common.c: Likewise.
66
c7131fb2
AM
672015-07-07 Andrew MacLeod <amacleod@redhat.com>
68
69 * c-array-notation.c: Adjust includes.
70 * c-aux-info.c: Likewise.
71 * c-convert.c: Likewise.
72 * c-decl.c: Likewise.
73 * c-errors.c: Likewise.
74 * c-lang.c: Likewise.
75 * c-objc-common.c: Likewise.
76 * c-parser.c: Likewise.
77 * c-typeck.c: Likewise.
78
da2e71c9
MLI
792015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
80
81 PR fortran/66605
82 * c-decl.c (finish_function): Call do_warn_unused_parameter.
83
b155cfd9
MP
842015-06-29 Marek Polacek <polacek@redhat.com>
85
86 PR c/66322
87 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
88 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
89 about -Wswitch-bool here.
90 (do_case): Update c_add_case_label call.
91 (c_finish_case): Update c_do_switch_warnings call.
92
31521951
MP
932015-06-27 Marek Polacek <polacek@redhat.com>
94
95 * c-typeck.c: Use VECTOR_TYPE_P throughout.
96
22d03525
MP
972015-06-26 Marek Polacek <polacek@redhat.com>
98
99 * c-array-notation.c (fix_builtin_array_notation_fn): Use
100 INDIRECT_REF_P.
101 * c-typeck.c (array_to_pointer_conversion): Likewise.
102 (build_unary_op): Likewise.
103 (c_finish_return): Likewise.
104
f0889939
AM
1052015-06-25 Andrew MacLeod <amacleod@redhat.com>
106
107 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
108 * c-parser.c: Likewise.
109
8d67ee55
RS
1102015-06-25 Richard Sandiford <richard.sandiford@arm.com>
111
112 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
113 instead of pointer_hash.
114 (detect_field_duplicates): Likewise.
115
0ae9bd27
MP
1162015-06-25 Marek Polacek <polacek@redhat.com>
117
118 * c-array-notation.c: Use VAR_P throughout.
119 * c-decl.c: Likewise.
120 * c-objc-common.c: Likewise.
121 * c-parser.c: Likewise.
122 * c-typeck.c: Likewise.
123
62f9079a
MP
1242015-06-25 Marek Polacek <polacek@redhat.com>
125
126 * c-decl.c: Use is_global_var throughout.
127 * c-parser.c: Likewise.
128 * c-typeck.c: Likewise.
129
abb226c9
AM
1302015-06-17 Andrew MacLeod <amacleod@redhat.com>
131
132 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
133 * c-aux-info.c: Likewise.
134 * c-convert.c: Likewise.
135 * c-decl.c: Likewise.
136 * c-errors.c: Likewise.
137 * c-lang.c: Likewise.
138 * c-objc-common.c: Likewise.
139 * c-parser.c: Likewise.
140 * c-typeck.c: Likewise.
141
8cbababc
JH
1422015-06-11 Jan Hubicka <hubicka@ucw.cz>
143
144 PR middle-end/66325
145 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
146 variants.
147
a0349665
PMR
1482015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
149
150 * c-decl.c (pop_scope): Register the main translation unit
151 through the new debug hook.
152
13fdf2e2
AM
1532015-06-08 Andrew MacLeod <amacleod@redhat.com>
154
155 * c-array-notation.c : Adjust include files.
156 * c-aux-info.c : Likewise.
157 * c-convert.c : Likewise.
158 * c-decl.c : Likewise.
159 * c-errors.c : Likewise.
160 * c-lang.c : Likewise.
161 * c-lang.h : Likewise.
162 * c-objc-common.c : Likewise.
163 * c-parser.c : Likewise.
164 * c-typeck.c : Likewise.
165
d7438551
AH
1662015-06-05 Aldy Hernandez <aldyh@redhat.com>
167
168 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
169 immediately clobber it.
170 (c_write_global_declarations_1): Remove call to
171 check_global_declaration_1.
172 (c_write_global_declarations_2): Remove.
173 (c_write_final_cleanups): Rename from c_write_global_declarations.
174 Remove call to finalize_compilation_unit.
175 Remove calls to debugging hooks.
176 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
177 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
178 * c-tree.h: Remove c_write_global_declarations.
179
ecb9f223
AM
1802015-06-04 Andrew MacLeod <amacleod@redhat.com>
181
182 * c-array-notation.c: Adjust includes for restructured coretypes.h.
183 * c-aux-info.c: Likewise.
184 * c-convert.c: Likewise.
185 * c-decl.c: Likewise.
186 * c-errors.c: Likewise.
187 * c-lang.c: Likewise.
188 * c-objc-common.c: Likewise.
189 * c-parser.c: Likewise.
190 * c-typeck.c: Likewise.
191
9482b620
MP
1922015-06-04 Marek Polacek <polacek@redhat.com>
193
194 PR c/66341
195 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
196 it is a lvalue.
197
bc51ace3
PK
1982015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
199
200 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
201 Warn for empty struct.
202 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
203
ea5b45b6
AT
2042015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
205
206 * c-decl.c (start_function): Call plugin before parsing.
207 (finish_function): Call plugin after parsing.
208
c2d47482
PK
2092015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
210
211 PR c/49551
212 * c-decl.c (merge_decls): Merge DECL_COMMON.
213
a95492ab
JW
2142015-05-22 Jim Wilson <jim.wilson@linaro.org>
215
216 * Make-lang.in (check_gcc_pallelize): Define.
217
fd5c817a
MP
2182015-05-22 Marek Polacek <polacek@redhat.com>
219
220 PR c/47043
221 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
222 attributes.
223
c7b70a3c
MP
2242015-05-21 Marek Polacek <polacek@redhat.com>
225
226 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
227 DECL_BUILT_IN.
228
21b634ae
MP
2292015-05-20 Marek Polacek <polacek@redhat.com>
230
231 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
232 * c-typeck.c: Likewise.
233
296a8c2f
MP
2342015-05-19 Marek Polacek <polacek@redhat.com>
235
236 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
237
41b37d5e
JJ
2382015-05-19 Jakub Jelinek <jakub@redhat.com>
239
240 PR middle-end/66199
241 * c-parser.c (c_parser_omp_for_loop): Don't add
242 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
243 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
244 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
245 constructs.
246
fab27f52
MM
2472015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
248
249 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 250 swaps.
fab27f52 251
40de31cf
MLI
2522015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
253
254 PR fortran/44054
255 * c-objc-common.c (c_tree_printer): Replace locus pointer with
256 accessor function.
257
3aa3c9fc
MP
2582015-05-14 Marek Polacek <polacek@redhat.com>
259
260 PR c/66066
261 PR c/66127
262 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
263 rather than with 0.
264
c3388e62
DM
2652015-05-12 David Malcolm <dmalcolm@redhat.com>
266
267 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
268 to add a call to warn_for_misleading_indentation.
269 (c_parser_else_body): Likewise, adding param "else_loc".
270 (c_parser_if_statement): Check for misleading indentation.
271 (c_parser_while_statement): Likewise.
272 (c_parser_for_statement): Likewise.
273
755e528f
MP
2742015-05-08 Marek Polacek <polacek@redhat.com>
275
276 PR c/64918
277 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
278 (output_init_element): Likewise.
279
0173bd2a
MP
2802015-05-07 Marek Polacek <polacek@redhat.com>
281
282 PR c/65179
283 * c-typeck.c (build_binary_op): Warn when left shifting a negative
284 value.
285
9babc352
MP
2862015-04-30 Marek Polacek <polacek@redhat.com>
287
288 * c-typeck.c (set_init_label): Call error_at instead of error and
289 pass LOC to it.
290
ac9f18db
MP
291 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
292 the type of a decl.
293
ec3fba51
MP
294 * c-typeck.c (c_build_va_arg): Clarify the error message.
295
b811915d
TS
2962015-04-29 Thomas Schwinge <thomas@codesourcery.com>
297
298 * c-parser.c (c_parser_oacc_enter_exit_data): Use
299 OMP_STANDALONE_CLAUSES.
300
f3075008
MP
3012015-04-28 Marek Polacek <polacek@redhat.com>
302
303 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
304
4e81b788
MP
3052015-04-28 Marek Polacek <polacek@redhat.com>
306
307 PR c/65901
308 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
309
6c1db78e
MP
3102015-04-25 Marek Polacek <polacek@redhat.com>
311
312 PR c/52085
313 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
314 attribute.
315
5c4abbb8
MP
3162015-04-23 Marek Polacek <polacek@redhat.com>
317
318 PR c/65345
319 * c-decl.c (set_labels_context_r): New function.
320 (store_parm_decls): Call it via walk_tree_without_duplicates.
321 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
322 instead of create_tmp_var. Build TARGET_EXPR instead of
323 COMPOUND_EXPR.
324 (build_atomic_assign): Use create_tmp_var_raw instead of
325 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
326
06aca1d5
IV
3272015-04-20 Ilya Verbin <ilya.verbin@intel.com>
328
329 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
330 (c_parser_omp_target_update): Add missed %> to error_at ().
331
8fba1830
BRF
3322015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
333
334 PR target/55143
335 * c-decl.c (c_default_pointer_mode): Remove definition.
336 * c-tree.h (c_default_pointer_mode): Remove declaration.
337
62021f64
TB
3382015-03-27 Tobias Burnus <burnus@net-b.de>
339
340 PR c/65586
341 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
342 error out.
343 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
344 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
345 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
346
9b65e171
JJ
3472015-03-19 Jakub Jelinek <jakub@redhat.com>
348
349 * c-decl.c (c_decl_attributes): Also add "omp declare target"
350 attribute for DECL_EXTERNAL VAR_DECLs.
351
17958621
JJ
3522015-03-11 Jakub Jelinek <jakub@redhat.com>
353
354 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
355 argument.
356
7ccb1a11
JJ
3572015-03-10 Jakub Jelinek <jakub@redhat.com>
358
359 PR c/65120
360 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
361 before preparing arguments to warn_logical_not_parentheses.
362
01177669
JJ
3632015-03-09 Jakub Jelinek <jakub@redhat.com>
364
365 PR c/65120
366 * c-typeck.c (parser_build_binary_op): Don't warn for
367 !!x == y or !b == y where b is _Bool.
368
802ac282
MP
3692015-03-09 Marek Polacek <polacek@redhat.com>
370
371 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
372 * c-decl.c (grokdeclarator): Likewise.
373 * c-typeck.c (build_binary_op): Likewise.
374
e5165b60
MP
3752015-02-27 Marek Polacek <polacek@redhat.com>
376
377 PR c/65228
378 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
379
065d214c
MP
3802015-02-14 Marek Polacek <polacek@redhat.com>
381
382 PR c/64768
383 * c-decl.c (grokdeclarator): Set the range of a flexible array member
384 declared through a typedef name.
385
e5d9235b
MP
3862015-02-13 Marek Polacek <polacek@redhat.com>
387
388 PR c/65050
389 * c-decl.c (grokdeclarator): Print also the type when giving
390 the error message about array's incomplete element type.
391
fa01ffcc
JJ
3922015-02-11 Jakub Jelinek <jakub@redhat.com>
393
394 PR c/64824
395 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
396 check in the POP macro.
397
c3e38a03
MP
3982015-02-09 Marek Polacek <polacek@redhat.com>
399
400 PR c/64856
401 * c-typeck.c (process_init_element): Don't always wrap
402 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
403 initializing a range of elements.
404
4886ec8e
JJ
4052015-02-04 Jakub Jelinek <jakub@redhat.com>
406
407 PR c/64824
408 PR c/64868
409 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
410
c3e38a03 4112015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
412
413 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
414 processing enum declaration.
415
7b33f0c8
MP
4162015-01-29 Marek Polacek <polacek@redhat.com>
417
418 PR c/64709
419 * c-typeck.c (pop_init_level): If constructor_elements has
420 exactly one element with integer_zerop value, set constructor_zeroinit
421 to 1. Remove braces around warning_init call.
422
dea63e49
JJ
4232015-01-27 Jakub Jelinek <jakub@redhat.com>
424
425 PR c/64766
426 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
427 of FUNCTION_DECLs with error_mark_node.
428
d38f7dce
JJ
4292015-01-26 Jakub Jelinek <jakub@redhat.com>
430
431 PR c/64778
432 * c-typeck.c (convert_arguments): Return -1 if there are
433 error_args, even if we've diagnosed too many arguments.
434
cbf5d0e7
RB
4352015-01-21 Richard Biener <rguenther@suse.de>
436
437 PR middle-end/64313
438 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
439 for builtins the user declared correctly.
440
41dbbb37
TS
4412015-01-15 Thomas Schwinge <thomas@codesourcery.com>
442 Bernd Schmidt <bernds@codesourcery.com>
443 Cesar Philippidis <cesar@codesourcery.com>
444 James Norris <jnorris@codesourcery.com>
445 Jakub Jelinek <jakub@redhat.com>
446 Ilmir Usmanov <i.usmanov@samsung.com>
447
448 * c-parser.c: Include "gomp-constants.h".
449 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
450 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
451 Use OMP_CLAUSE_SET_MAP_KIND.
452 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
453 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
454 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
455 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
456 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
457 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
458 "copyout", "create", "delete", "deviceptr", "gang", "host",
459 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
460 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
461 "present_or_create", "pcreate", "seq", "self", "vector",
462 "vector_length", "wait", "worker".
463 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
464 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
465 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
466 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
467 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
468 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
469 (c_parser_oacc_data_clause_deviceptr)
470 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
471 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
472 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
473 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
474 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
475 (c_parser_oacc_parallel, c_parser_oacc_update)
476 (c_parser_oacc_wait): New functions.
477 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
478 (c_finish_oacc_data): New prototypes.
479 * c-typeck.c: Include "gomp-constants.h".
480 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
481 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
482 OMP_CLAUSE_SET_MAP_KIND.
483 (c_finish_oacc_parallel, c_finish_oacc_kernels)
484 (c_finish_oacc_data): New functions.
485 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
486 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
487 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
488 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
489 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
490 GOMP_MAP_FORCE_DEVICEPTR.
491
adfac8df
JJ
4922015-01-09 Michael Collison <michael.collison@linaro.org>
493
494 * c-array-notation.c: Include hash-set.h, machmode.h,
495 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
496 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
497 * c-aux-info.c: Ditto.
498 * c-convert.c: Ditto.
499 * c-decl.c: Ditto.
500 * c-errors.c: Ditto.
501 * c-lang.c: Dittoxs.
502 * c-objc-common.c: Ditto.
503 * c-parser.c: Ditto.
504 * c-typeck.c: Include hash-set.h, machmode.h,
505 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
506 fold-const.h, wide-int.h, inchash.h, real.h and
507 fixed-value.h due to flattening of tree.h.
508
2cc901dc
MP
5092015-01-07 Marek Polacek <polacek@redhat.com>
510
511 PR c/64417
512 * c-typeck.c (process_init_element): Disallow initialization of
513 a flexible array member with a string constant if the structure
514 is in an array.
515
5624e564
JJ
5162015-01-05 Jakub Jelinek <jakub@redhat.com>
517
e5341100
JJ
518 PR sanitizer/64344
519 * c-typeck.c (convert_for_assignment, c_finish_return): For
520 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
521 types also set in_late_binary_op around convert call.
522 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
523 to integral type casts, if not in_late_binary_op, pass c_fully_fold
524 result on expr as last argument to ubsan_instrument_float_cast,
525 if in_late_binary_op, don't use c_save_expr but save_expr.
526
5624e564
JJ
527 Update copyright years.
528
5bd012f8
MP
5292015-01-05 Marek Polacek <polacek@redhat.com>
530
531 PR c/64423
532 * c-typeck.c (build_array_ref): Pass loc down to
533 warn_array_subscript_with_type_char.
534
768952be
MU
5352014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
536
537 * c-typeck.c: New behavious for pointers to arrays with qualifiers
538 (common-pointer-type): For pointers to arrays take qualifiers from
539 element type.
540 (build_conditional_expr): Add warnings for lost qualifiers.
541 (comp-target-types): Allow pointers to arrays with different qualifiers.
542 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
543 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
544 to PEDWARN_FOR_QUALIFIERS.
545
8f94a8c4
JJ
5462014-12-17 Jakub Jelinek <jakub@redhat.com>
547
548 PR sanitizer/64289
549 * c-convert.c: Include ubsan.h.
550 (convert): For real -> integral casts and
551 -fsanitize=float-cast-overflow don't call convert_to_integer, but
552 instead instrument the float cast directly.
553
b731b390
JJ
5542014-11-29 Jakub Jelinek <jakub@redhat.com>
555
556 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
557 c_finish_stmt_expr): Remove NULL last argument from
558 create_tmp_var_raw and create_tmp_var calls.
559 * c-array-notation.c (fix_builtin_array_notation_fn,
560 build_array_notation_expr, fix_conditional_array_notations_1,
561 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
562
541e35a6
MP
5632014-11-28 Marek Polacek <polacek@redhat.com>
564
565 PR c/63862
566 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
567 convert the right operand to integer type.
568
b286be94
MP
5692014-11-25 Marek Polacek <polacek@redhat.com>
570
571 PR c/63877
572 * c-decl.c (start_function): Disable -Wmissing-declarations warning
573 for inline functions.
574
aa7da51a
JJ
5752014-11-21 Jakub Jelinek <jakub@redhat.com>
576
577 PR target/63764
578 * c-typeck.c (build_array_ref): Adjust
579 convert_vector_to_pointer_for_subscript caller. If it returns true,
580 call non_lvalue_loc on the result.
581
d876207f
RB
5822014-11-11 Richard Biener <rguenther@suse.de>
583
584 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
585 to true.
586
e5e44252
AK
5872014-11-10 Andi Kleen <ak@linux.intel.com>
588
589 PR c/60804
590 * c-parser.c (c_parser_statement_after_labels): Call
591 check_no_cilk.
592 (c_parser_if_statement): Dito.
593 (c_parser_switch_statement): Dito.
594 (c_parser_while_statement): Dito.
595 (c_parser_do_statement): Dito.
596 (c_parser_for_statement): Dito.
597 * c-typeck.c (c_finish_loop): Dito.
598
13c21655
PC
5992014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
600
601 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
602 OPT_Wshift_count_overflow in the warnings.
603
2d51fcef
MP
6042014-10-30 Marek Polacek <polacek@redhat.com>
605
606 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
607 print the stripped version as well, if they're not the same.
608
ef4bddc2
RS
6092014-10-29 Richard Sandiford <richard.sandiford@arm.com>
610
611 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
612 machine_mode.
613
c582198b
AM
6142014-10-28 Andrew MacLeod <amacleod@redhat.com>
615
616 * c-decl.c: Adjust include files.
617 * c-parser.c: Ditto.
618
ddc8de03
PM
6192014-10-27 Phil Muldoon <pmuldoon@redhat.com>
620 Tom Tromey <tromey@redhat.com>
621
622 * c-tree.h (enum c_oracle_request): New.
623 (c_binding_oracle_function): New typedef.
624 (c_binding_oracle, c_pushtag, c_bind): Declare.
625 * c-decl.c (c_binding_oracle): New global.
626 (I_SYMBOL_CHECKED): New macro.
627 (i_symbol_binding): New function.
628 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
629 (I_TAG_CHECKED): New macro.
630 (i_tag_binding): New function.
631 (I_TAG_BINDING, I_TAG_DECL): Redefine.
632 (I_LABEL_CHECKED): New macro.
633 (i_label_binding): New function.
634 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
635 (c_print_identifier): Save and restore c_binding_oracle.
636 (c_pushtag, c_bind): New functions.
637
60393bbc
AM
6382014-10-27 Andrew MacLeod <amacleod@redhat.com>
639
640 * c-typeck.c: Adjust include files.
641
d723bb7c
MLI
6422014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
643
644 PR c++/53061
645 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
646 initialization here...
647 (c_initialize_diagnostics): ... but here. Set defaults after
648 building pretty-printer.
649
1bc5a451
MP
6502014-10-23 Marek Polacek <polacek@redhat.com>
651
652 PR c/63626
653 * c-decl.c (pop_scope): Don't print warning in external_scope.
654
4435bb92
MP
6552014-10-19 Marek Polacek <polacek@redhat.com>
656
657 PR c/63567
658 * c-typeck.c (output_init_element): Allow initializing objects with
659 static storage duration with compound literals even in C99 and add
660 pedwarn for it.
661
7278465e
MP
6622014-10-17 Marek Polacek <polacek@redhat.com>
663
664 PR c/63567
665 * c-typeck.c (digest_init): Allow initializing objects with static
666 storage duration with compound literals even in C99 and add pedwarn
667 for it.
668
d9b7be2e
MP
6692014-10-17 Marek Polacek <polacek@redhat.com>
670
671 PR c/63543
672 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
673 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
674 error multiple times. Print the type.
675
f406ae1f
MP
6762014-10-17 Marek Polacek <polacek@redhat.com>
677
678 PR c/63549
679 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
680 type.
681
92574c7c
MP
6822014-10-17 Marek Polacek <polacek@redhat.com>
683
684 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
685 (start_function): Use OPT_Wimplicit_int instead of 0.
686 (store_parm_decls_oldstyle): Likewise.
687
1bc4a978
MT
6882014-10-17 Alan Modra <amodra@gmail.com>
689
690 PR middle-end/61848
691 * c-decl.c (merge_decls): Don't merge section name or tls model
692 to newdecl symtab node, instead merge to olddecl. Override
693 existing olddecl section name. Set tls_model for all thread-local
694 vars, not just OMP thread-private ones. Remove incorrect comment.
695
83685514
AM
6962014-10-16 Andrew MacLeod <amacleod@redhat.com>
697
698 * c-decl.c: Adjust include files.
699
78a7c317
DD
7002014-10-14 DJ Delorie <dj@redhat.com>
701
702 * c-parser.c (c_parse_init): Add RID entries for each __intN.
703 (c_token_starts_typename): Check all __intN, not just __int128.
704 (c_token_starts_declspecs): Likewise.
705 (c_parser_declspecs): Likewise.
706 (c_parser_attribute_any_word): Likewise.
707 (c_parser_objc_selector): Likewise.
708 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
709 (struct c_declspecs): Add int_n_idx field to record *which* __intN
710 is specified.
711 * c-decl.c (declspecs_add_type): Check for all __intN, not just
712 __int128.
713 (finish_declspecs): Likewise.
714
74d98c1e
AB
7152014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
716
717 * c-parser.c (c_parser_all_labels): New function to replace
718 the duplicate code.
719 (c_parser_statement): Call the new function.
720
84937de2
MP
7212014-10-09 Marek Polacek <polacek@redhat.com>
722
723 PR c/63480
724 * c-typeck.c (pop_init_level): Don't warn about initializing
725 with { }.
726
0382aaa0
MP
7272014-10-07 Marek Polacek <polacek@redhat.com>
728
729 PR c/59717
730 * c-decl.c (header_for_builtin_fn): New function.
731 (implicitly_declare): Suggest which header to include.
732
7a0ca710
MP
7332014-10-07 Marek Polacek <polacek@redhat.com>
734
735 * c-convert.c (convert): Use error_operand_p.
736 * c-typeck.c (require_complete_type): Likewise.
737 (really_atomic_lvalue): Likewise.
738 (digest_init): Likewise.
739 (handle_omp_array_sections_1): Likewise.
740
6bc8a126
MP
7412014-10-03 Marek Polacek <polacek@redhat.com>
742
743 PR c/63453
744 * c-decl.c (pop_scope): Don't warn about "inline function declared
745 but never defined" for functions marked with gnu_inline attribute.
746
d90c0a59
JJ
7472014-09-25 Jakub Jelinek <jakub@redhat.com>
748
749 PR c++/63249
750 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
751 on low_bound and length.
752
083e891e
MP
7532014-09-24 Marek Polacek <polacek@redhat.com>
754
755 PR c/61405
756 PR c/53874
757 * c-parser.c: Don't define CPP_KEYWORD.
758 (c_parser_switch_statement): Pass original type to c_finish_case.
759 * c-tree.h (c_finish_case): Update declaration.
760 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
761 conditionally to c_do_switch_warnings.
762
8d95fe25
MP
7632014-09-03 Marek Polacek <polacek@redhat.com>
764
765 PR c/62024
766 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
767 conversions.
768
9a771876
JJ
7692014-09-02 Jakub Jelinek <jakub@redhat.com>
770 Balaji V. Iyer <balaji.v.iyer@intel.com>
771 Igor Zamyatin <igor.zamyatin@intel.com>
772
773 * c-parser.c (c_parser_cilk_for): New function.
774 (c_parser_cilk_grainsize): Likewise.
775 (c_get_temp_regvar): Likewise.
776 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
777 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
778 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
779 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
780 case.
781
b7679d96
CG
7822014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
783
784 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
785 with using HOST_WIDE_INT without truncation to 'int'
786
59ea0364
MP
7872014-08-22 Marek Polacek <polacek@redhat.com>
788
789 PR c++/62199
790 * c-typeck.c (parser_build_binary_op): Adjust call to
791 warn_logical_not_parentheses.
792
671a475e
IZ
7932014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
794
795 PR other/62008
796 * c-parser.c (c_parser_array_notation): Check for correct
797 type of an array added.
798
04159acf
MP
7992014-08-19 Marek Polacek <polacek@redhat.com>
800
801 PR c++/62153
802 * c-typeck.c (build_binary_op): If either operand of a comparison
803 is a boolean expression, call maybe_warn_bool_compare.
804
c77935ee
PP
8052014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
806
807 PR c/45584
808 * c-typeck.c (build_c_cast): Do a conversion even when the
809 TYPE_MAIN_VARIANTs are the same.
810
35aff4fb
MP
8112014-08-19 Marek Polacek <polacek@redhat.com>
812
813 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
814 pedwarn_c99 instead of pedwarn.
815 (grokfield): Likewise.
816 (warn_defaults_to): New function.
817 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
818 Unconditionally call pedwarn_c99 instead of pedwarn.
819 (start_function): Call warn_defaults_to instead of pedwarn_c99.
820 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
821 check flag_isoc11 before.
822 * c-errors.c (pedwarn_c99): Change the return type to bool.
823 Handle -Wc99-c11-compat.
824 * c-parser.c (disable_extension_diagnostics): Handle
825 warn_c99_c11_compat.
826 (restore_extension_diagnostics): Likewise.
827 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
828 instead of pedwarn, don't check flag_isoc11 before.
829 (c_parser_declspecs): Likewise.
830 (c_parser_alignas_specifier): Likewise.
831 (c_parser_alignof_expression): Likewise.
832 (c_parser_generic_selection): Likewise.
833 * c-tree.h (pedwarn_c99): Update declaration.
834 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
835 of pedwarn_c99.
836
177cce46
MP
8372014-08-19 Marek Polacek <polacek@redhat.com>
838
839 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
840 to pedwarn_c90.
841 * c-errors.c: Include "opts.h".
842 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
843 * c-parser.c (disable_extension_diagnostics): Handle negative value
844 of warn_c90_c99_compat, too.
845 (restore_extension_diagnostics): Likewise.
846 (c_parser_compound_statement_nostart): Pass
847 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
848
6dc99c33
MP
8492014-08-12 Marek Polacek <polacek@redhat.com>
850
851 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
852 Add pedwarn.
853 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
854 Likewise.
855 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
856
f3bede71
MP
8572014-08-10 Marek Polacek <polacek@redhat.com>
858
859 PR c/51849
860 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
861 Call pedwarn_c90 instead of pedwarn.
862 (check_bitfield_type_and_width): Likewise.
863 (declspecs_add_qual): Likewise.
864 (declspecs_add_type): Likewise.
865 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
866 Adjust to only call pedwarn_c90.
867 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
868 pedwarn_c90 instead of pedwarn.
869 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
870 * c-parser.c (disable_extension_diagnostics): Handle
871 warn_c90_c99_compat.
872 (restore_extension_diagnostics): Likewise.
873 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
874 pedwarn_c90 instead of pedwarn.
875 (c_parser_initelt): Likewise.
876 (c_parser_postfix_expression): Likewise.
877 (c_parser_postfix_expression_after_paren_type): Likewise.
878 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
879 * c-tree.h: Fix formatting.
880 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
881 pedwarn_c90 instead of pedwarn.
882
9f25a338
TS
8832014-08-07 Trevor Saunders <tsaunders@mozilla.com>
884
885 * c-typeck.c: Remove include of pointer-set.h.
886
044331a8
MP
8872014-08-07 Marek Polacek <polacek@redhat.com>
888
889 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
890
b787e7a2
TS
8912014-08-02 Trevor Saunders <tsaunders@mozilla.com>
892
893 * c-typeck.c: Use hash_map instead of pointer_map.
894
6e2830c3
TS
8952014-08-02 Trevor Saunders <tsaunders@mozilla.com>
896
897 * c-decl.c: Use hash_set instead of pointer_set.
898
a7ee52fb
IZ
8992014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
900
901 PR middle-end/61455
902 * c-array-notation.c (expand_array_notations): Handling
903 of DECL_EXPR added.
904
b4dfdc11
MG
9052014-07-31 Marc Glisse <marc.glisse@inria.fr>
906
907 PR c++/60517
908 * c-typeck.c (c_finish_return): Return 0 instead of the address of
909 a local variable.
910
976d5a22
TT
9112014-07-30 Tom Tromey <tromey@redhat.com>
912
913 * c-typeck.c (struct constructor_stack) <designator_depth>: New
914 field.
915 (really_start_incremental_init, push_init_level): Initialize
916 designator_depth.
917 (pop_init_level): Set global designator_depth.
918 (process_init_element): Check for designated_init attribute.
919
30281de2
MP
9202014-07-20 Marek Polacek <polacek@redhat.com>
921
922 PR c/61852
923 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
924 (implicitly_declare): Pass location to implicit_decl_warning.
925
b108f48f
JJ
9262014-07-14 Jakub Jelinek <jakub@redhat.com>
927
928 PR middle-end/61294
929 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
930 If non-NULL, call c_parser_check_literal_zero.
931 (c_parser_check_literal_zero): New function.
932 (c_parser_postfix_expression_after_primary): Adjust
933 c_parser_expr_list caller, handle -Wmemset-transposed-args.
934
773ec47f
MP
9352014-07-06 Marek Polacek <polacek@redhat.com>
936
937 PR c/6940
938 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
939 * c-tree.h (C_ARRAY_PARAMETER): Define.
940 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
941 function parameter.
942
22e1cf1c
JH
9432014-07-02 Jan Hubicka <hubicka@ucw.cz>
944 Chen Gang <gang.chen.5i5j@gmail.com>
945
946 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
947 releasing symbol.
948
52ec0ea3
MP
9492014-07-01 Marek Polacek <polacek@redhat.com>
950
951 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
952 instead of 0 to WARN_FOR_ASSIGNMENT.
953
d5c3d343
MP
9542014-07-01 Marek Polacek <polacek@redhat.com>
955
956 PR c/58286
957 * c-typeck.c (convert_for_assignment): Pass
958 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
959
6a7253a4
MP
9602014-06-30 Marek Polacek <polacek@redhat.com>
961
962 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
963 has no_sanitize_undefined attribute.
964
5e88a8f4
IZ
9652014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
966
967 PR middle-end/57541
968 * c-array-notation.c (fix_builtin_array_notation_fn):
969 Check for 0 arguments in builtin call. Check that bultin argument is
970 correct.
971 * c-parser.c (c_parser_array_notation): Check for incorrect initial
972 index.
973
9698b078
SH
9742014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
975
976 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
977 qualifiers in __auto_type for atomic types.
978 (c_parser_typeof_specifier): Discard all type qualifiers in
979 __typeof__ for atomic types.
980
6e07c515
MP
9812014-06-25 Marek Polacek <polacek@redhat.com>
982
983 PR c/61162
984 * c-parser.c (c_parser_statement_after_labels): Pass the location of
985 the return expression to c_finish_return.
986
da6f124d
JJ
9872014-06-25 Jakub Jelinek <jakub@redhat.com>
988
989 * c-typeck.c (c_finish_omp_clauses): Make sure
990 OMP_CLAUSE_LINEAR_STEP has correct type.
991
c203e8a7
TS
9922014-06-24 Trevor Saunders <tsaunders@mozilla.com>
993
994 * c-decl.c: Adjust.
995
56ad0e38
JJ
9962014-06-24 Jakub Jelinek <jakub@redhat.com>
997
998 * c-parser.c (c_parser_omp_for_loop): For
999 #pragma omp parallel for simd move lastprivate clause from parallel
1000 to for rather than simd.
1001
47c2554f
MP
10022014-06-23 Marek Polacek <polacek@redhat.com>
1003
1004 * c-typeck.c (parser_build_binary_op): Don't call
1005 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
1006
56363ffd
JH
10072014-06-15 Jan Hubicka <hubicka@ucw.cz>
1008
1009 * c-parser.c (c_parser_omp_threadprivate): Likewise.
1010 * c-decl.c (merge_decls): Likewise.
1011
d7ff7ae5
MP
10122014-06-09 Marek Polacek <polacek@redhat.com>
1013
1014 PR c/36446
1015 * c-typeck.c (error_init): Call inform instead of error_at.
1016 (pedwarn_init): Call inform instead of pedwarn.
1017 (warning_init): Call inform instead of warning_at.
1018
24d047a3
JH
10192014-06-07 Jan Hubicka <hubicka@ucw.cz>
1020
1021 * c-decl.c (merge_decls): Use set_decl_section_name.
1022 (duplicate_decls): Remove node if it exists.
1023
9bac5cbb
G
10242014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
1025
1026 PR c/53119
1027 * c-typeck.c (push_init_level, process_init_element,
1028 pop_init_level): Correct check for zero initialization, move
1029 missing brace warning to respect zero initialization.
1030
8ffcdea8
MP
10312014-06-05 Marek Polacek <polacek@redhat.com>
1032
1033 PR c/56724
1034 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
1035
742938c9
MP
10362014-06-05 Marek Polacek <polacek@redhat.com>
1037
1038 PR c/49706
1039 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
1040 on the left hand side operand of a comparison.
1041
6447c55d
MP
10422014-06-05 Marek Polacek <polacek@redhat.com>
1043
1044 PR c/48062
1045 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
1046 Print note only if the warning was printed.
1047
9dc7743c
IZ
10482014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
1049
1050 PR c/58942
1051 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
1052 with a pointer.
1053
fedfecef
MP
10542014-06-03 Marek Polacek <polacek@redhat.com>
1055
1056 PR c/60439
1057 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
1058 c_start_case.
1059 * c-tree.h (c_start_case): Update.
1060 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
1061 switch condition has boolean value.
1062
9b2b7279
AM
10632014-06-02 Andrew MacLeod <amacleod@redhat.com>
1064
1065 * c-decl.c: Include builtins.h.
1066 * c-parser.c: Likewise.
1067
5c1bc275
MP
10682014-05-27 Marek Polacek <polacek@redhat.com>
1069
1070 PR c/56724
1071 * c-typeck.c (convert_arguments): Get location of a parameter. Change
1072 error and warning calls to error_at and warning_at. Pass location of
1073 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
1074 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
1075 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
1076
97563bc8
IZ
10772014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
1078
1079 PR c/61191
1080 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
1081 function parameters.
1082
aede2c10
JH
10832014-05-23 Jan Hubicka <hubicka@ucw.cz>
1084
1085 * c-decl.c (merge_decls): Preserve symtab node pointers.
1086 (duplicate_decls): Free new decl.
1087
edbba2ce
TS
10882014-05-23 Thomas Schwinge <thomas@codesourcery.com>
1089
f3316c6d
TS
1090 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
1091 initialization.
1092
edbba2ce
TS
1093 * c-parser.c (c_parser_omp_target): Return bool values.
1094
68c81f24
TS
10952014-05-22 Thomas Schwinge <thomas@codesourcery.com>
1096
1097 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
1098 num_teams_loc variable to num_thread_limit_loc.
1099
632f2871
RS
11002014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
1101
1102 * c-array-notation.c (expand_array_notations): Use void_node
1103 instead of void_zero_node.
1104
766090c2
TS
11052014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1106
1107 * c-decl.c (finish_struct): Adjust.
1108 (finish_enum): Likewise.
1109 (bind): Adjust.
1110 (record_inline_static): Likewise.
1111 (push_scope): Likewise.
1112 (make_label): Likewise.
1113 (lookup_label_for_goto): Likewise.
1114 (finish_struct): Likewise.
1115 (finish_enum): Likewise.
1116 (store_parm_decls): Likewise.
1117 (c_push_function_context): Likewise.
1118 * c-lang.h: Remove usage of variable_size gty attribute.
1119 * c-parser.c (c_parse_init): Adjust.
1120 (c_parse_file): Likewise.
1121
2b107f6b
MP
11222014-05-13 Marek Polacek <polacek@redhat.com>
1123
1124 PR c/61162
1125 * c-typeck.c (convert_for_assignment): Pass location to
1126 WARN_FOR_ASSIGNMENT instead of input_location.
1127
d033409e
MP
11282014-05-10 Marek Polacek <polacek@redhat.com>
1129
1130 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
1131 maybe_warn_string_init.
1132 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
1133 maybe_warn_string_init.
1134 * c-tree.h (maybe_warn_string_init): Update declaration.
1135 * c-typeck.c (maybe_warn_string_init): Add location parameter.
1136 Call pedwarn_init with loc instead of with input_location.
1137 (digest_init): Pass init_loc to maybe_warn_string_init.
1138 (pop_init_level): Call pedwarn_init with loc instead of with
1139 input_location.
1140 (set_init_index): Likewise.
1141 (process_init_element): Likewise.
1142
ea58ef42
MP
11432014-05-09 Marek Polacek <polacek@redhat.com>
1144
1145 PR c/61096
1146 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
1147 (c_parser_initelt): Pass location to set_init_label. Pass array index
1148 location to set_init_index.
1149 * c-tree.h (push_init_level): Update declaration.
1150 (pop_init_level): Likewise.
1151 (set_init_index): Likewise.
1152 (set_init_label): Likewise.
1153 * c-typeck.c (error_init): Add location parameter. Call error_at
1154 instead of error.
1155 (digest_init): Pass init_loc to error_init.
1156 (really_start_incremental_init):
1157 (push_init_level): Add location parameter. Pass loc to pop_init_level
1158 and error_init.
1159 (pop_init_level): Likewise.
1160 (set_designator): Add location parameter. Pass loc to pop_init_level,
1161 push_init_level, and error_init.
1162 (set_init_index): Add location parameter. Pass loc to error_init and
1163 set_designator.
1164 (set_init_label): Likewise.
1165 (output_init_element): Pass loc to error_init.
1166 (process_init_element): Pass loc to error_init, pop_init_level,
1167 pedwarn_init, and push_init_level.
1168
661a0813
MP
11692014-05-09 Marek Polacek <polacek@redhat.com>
1170
1171 PR c/50459
1172 * c-parser.c (c_parser_attributes): Parse the arguments as an
1173 expression-list if the attribute takes identifier.
1174
2793eeab
MP
11752014-05-08 Marek Polacek <polacek@redhat.com>
1176
1177 PR c/61053
1178 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
1179 TYPE_ALIGN_UNIT.
1180
f827930a
MP
11812014-05-08 Marek Polacek <polacek@redhat.com>
1182
1183 PR c/61077
1184 * c-decl.c (start_function): Warn for _Atomic-qualified return type
1185 of main.
1186
1d60af08
KZ
11872014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1188 Mike Stump <mikestump@comcast.net>
1189 Richard Sandiford <rdsandiford@googlemail.com>
1190
1191 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
1192 (finish_enum): Use wide-int interfaces.
1193 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
1194 * c-typeck.c (build_c_cast): Likewise.
1195 (set_nonincremental_init_from_string): Likewise.
1196 (c_tree_equal): Likewise.
1197
a0e24419
MP
11982014-05-02 Marek Polacek <polacek@redhat.com>
1199
1200 PR c/25801
1201 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
1202 Return size_one_node when the type is not complete.
1203 (pointer_diff): Remove comment.
1204 (build_unary_op): Improve error messages.
1205
19fc9faa
MP
12062014-05-02 Marek Polacek <polacek@redhat.com>
1207
1208 * c-typeck.c (c_finish_return): Separate warning_at calls.
1209
63bc4e87
MP
12102014-05-02 Marek Polacek <polacek@redhat.com>
1211
1212 * c-tree.h (error_init): Remove declaration.
1213 (pedwarn_init): Likewise.
1214 * c-typeck.c (error_init): Make static and move above.
1215 (pedwarn_init): Likewise.
1216 (warning_init): Move above.
1217 (maybe_warn_string_init): Likewise.
1218
4bd2511b
JL
12192014-05-01 Jeff Law <law@redhat.com>
1220
1221 Revert:
1222
1223 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1224 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
1225 avoid goto.
1226
6a358dcb
MP
12272014-05-02 Marek Polacek <polacek@redhat.com>
1228
1229 PR c/60784
1230 * c-typeck.c (push_init_level): Set constructor_designated to
1231 p->designated for structures.
1232
ae5ebda4
MP
12332014-05-01 Marek Polacek <polacek@redhat.com>
1234
1235 PR c/60915
1236 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
1237 function-definition has an attribute after the declarator.
1238
96b40f8d
MP
12392014-05-01 Marek Polacek <polacek@redhat.com>
1240
1241 PR c/60257
1242 * c-typeck.c (warning_init): Add location_t parameter. Call
1243 warning_at instead of warning.
1244 (push_init_level): Pass input_location to warning_init.
1245 (add_pending_init): Add location_t parameter. Pass loc to
1246 warning_init.
1247 (set_nonincremental_init): Pass input_location to add_pending_init.
1248 (set_nonincremental_init_from_string): Likewise.
1249 (output_init_element): Pass loc to warning_init and to
1250 add_pending_init.
1251
32e00768
MP
12522014-05-01 Marek Polacek <polacek@redhat.com>
1253
1254 PR c/43395
1255 * c-typeck.c (c_finish_return): Distinguish between label and variable
1256 when warning about returning local address.
1257
c9379ce2
MP
12582014-05-01 Marek Polacek <polacek@redhat.com>
1259
1260 PR c/29467
1261 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
1262 in C89 mode.
1263
d00887e8
MP
12642014-05-01 Marek Polacek <polacek@redhat.com>
1265
1266 PR c/43245
1267 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
1268 instead of 0 to WARN_FOR_QUALIFIERS.
1269
5436fa2e
MP
12702014-05-01 Marek Polacek <polacek@redhat.com>
1271
1272 PR c/56989
1273 * c-typeck.c (default_conversion): Use better location for
1274 error call.
1275
f8ed5150
MP
12762014-04-30 Marek Polacek <polacek@redhat.com>
1277
1278 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
1279 also when SANITIZE_FLOAT_DIVIDE is on.
1280
8337d1db
MP
12812014-04-30 Marek Polacek <polacek@redhat.com>
1282
1283 PR c/60139
1284 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
1285 and pedwarn_init. Use loc insted of input_location.
1286
c4bdc42f
MP
12872014-04-30 Marek Polacek <polacek@redhat.com>
1288
1289 PR c/60351
1290 * c-typeck.c (build_binary_op): Use location when warning about
1291 shift count.
1292
45484dcf
MP
12932014-04-25 Marek Polacek <polacek@redhat.com>
1294
1295 PR c/18079
1296 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
1297 always_inline/noinline and hot/cold attributes.
1298
34cf811f
MP
12992014-04-25 Marek Polacek <polacek@redhat.com>
1300
1301 PR c/60114
1302 * c-parser.c (c_parser_initelt): Pass input_location to
1303 process_init_element.
1304 (c_parser_initval): Pass loc to process_init_element.
1305 * c-tree.h (process_init_element): Adjust declaration.
1306 * c-typeck.c (push_init_level): Pass input_location to
1307 process_init_element.
1308 (pop_init_level): Likewise.
1309 (set_designator): Likewise.
1310 (output_init_element): Add location_t parameter. Pass loc to
1311 digest_init.
1312 (output_pending_init_elements): Pass input_location to
1313 output_init_element.
1314 (process_init_element): Add location_t parameter. Pass loc to
1315 output_init_element.
1316
42056eac
JJ
13172014-04-24 Jakub Jelinek <jakub@redhat.com>
1318
1319 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
1320 atomic-clause, allow comma in between atomic-clause and
1321 seq_cst.
1322
e162a134
JJ
13232014-04-22 Jakub Jelinek <jakub@redhat.com>
1324
1325 PR c/59073
1326 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
1327 fails, don't set OM_PARALLEL_COMBINED and return NULL.
1328
2f6babac
IZ
13292014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
1330
1331 PR middle-end/60469
1332 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1333 create_tmp_var instead build_decl for creating temps.
1334 (build_array_notation_expr): Likewise.
1335 (fix_conditional_array_notations_1): Likewise.
1336 (fix_array_notation_expr): Likewise.
1337 (fix_array_notation_call_expr): Likewise.
1338
8edbfaa6
JJ
13392014-03-28 Jakub Jelinek <jakub@redhat.com>
1340
1341 PR c++/60689
1342 * c-tree.h (c_build_function_call_vec): New prototype.
1343 * c-typeck.c (build_function_call_vec): Don't call
1344 resolve_overloaded_builtin here.
1345 (c_build_function_call_vec): New wrapper function around
1346 build_function_call_vec. Call resolve_overloaded_builtin here.
1347 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
1348 Call c_build_function_call_vec instead of build_function_call_vec.
1349 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1350 * c-decl.c (finish_decl): Likewise.
1351
7485aeea
MLI
13522014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1353
1354 PR c/55383
1355 * c-typeck.c: Use correct format string in cast-qual warning
1356
b17a8b07
TS
13572014-03-07 Thomas Schwinge <thomas@codesourcery.com>
1358
1359 * c-decl.c (c_decl_attributes): Use
1360 lang_hooks.types.omp_mappable_type.
1361 * c-typeck.c (c_finish_omp_clauses): Likewise.
1362
3af9c5e9
MP
13632014-03-06 Marek Polacek <polacek@redhat.com>
1364
1365 PR c/60197
1366 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
1367 of checking tree code.
1368
1c9f5f33
PK
13692014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1370
1371 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
1372 (c_parser_parameter_declaration): Likewise.
1373
cc28fc7f
MP
13742014-02-19 Marek Polacek <polacek@redhat.com>
1375
1376 PR c/60195
1377 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
1378 Call mark_exp_read on exp.value.
1379 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
1380 TREE_ADDRESSABLE on old instead of val.
1381 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
1382
b581c05c
PK
13832014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1384
1385 * c-parser.c (c_parser_get_builtin_args): Replace calls to
1386 C_EXPR_APPEND by vec_safe_push.
1387 * c-tree.h (C_EXPR_APPEND): Remove.
1388
81e5eca8
MP
13892014-01-31 Marek Polacek <polacek@redhat.com>
1390
1391 PR c/59963
1392 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
1393 build_function_call_vec.
1394 (build_function_call): Likewise.
1395 (build_atomic_assign): Likewise.
1396 (build_function_call_vec): Add arg_loc parameter. Use it.
1397 (convert_arguments): Likewise.
1398 (convert_for_assignment): Rename rhs_loc to expr_loc.
1399 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
1400 (c_parser_objc_keywordexpr): Likewise.
1401 (c_parser_postfix_expression_after_primary): Call
1402 build_function_call_vec with expr_loc rather than op_loc.
1403 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
1404 build_function_call_vec.
1405 (c_parser_expr_list): Add locations parameter. Fill it with locations
1406 of function arguments.
1407 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
1408
68fca595
MP
14092014-01-30 Marek Polacek <polacek@redhat.com>
1410
1411 PR c/59940
1412 * c-typeck.c (build_function_call_vec): Use loc parameter.
1413 (convert_arguments): Add location parameter. Use it.
1414 (ep_convert_and_check): Likewise.
1415 (build_atomic_assign): Adjust convert_for_assignment call.
1416 (build_modify_expr): Likewise.
1417 (digest_init): Likewise.
1418 (c_finish_return): Likewise.
1419 (build_conditional_expr): Adjust ep_convert_and_check calls.
1420 (convert_for_assignment): Add rhs_loc parameter. Use it.
1421 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
1422 calls.
1423
fa337f3a
RB
14242014-01-30 Richard Biener <rguenther@suse.de>
1425
1426 PR c/59905
1427 * c-typeck.c (build_function_call_vec): Do not replace calls
1428 to a function via an incompatible type with a runtime abort.
1429
b72271b9
BI
14302014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1431
1432 * c-parser.c (c_parser_declaration_or_fndef): Replaced
1433 flag_enable_cilkplus with flag_cilkplus.
1434 (c_parser_direct_declarator_inner): Likewise.
1435 (c_parser_attribute_any_word): Likewise.
1436 (c_parser_attributes): Likewise.
1437 (c_parser_compound_statement): Likewise.
1438 (c_parser_statement_after_labels): Likewise.
1439 (c_parser_if_statement): Likewise.
1440 (c_parser_switch_statement): Likewise.
1441 (c_parser_do_statement): Likewise.
1442 (c_parser_for_statement): Likewise.
1443 (c_parser_unary_expression): Likewise.
1444 (c_parser_postfix_expression): Likewise.
1445 (c_parser_postfix_expression_after_primary): Likewise.
1446 (c_parser_postfix_expression_after_primary): Likewise.
1447 (c_parser_omp_clause_name): Likewise.
1448 (c_finish_omp_declare_simd): Likewise.
1449 (c_parser_cilk_verify_simd): Likewise.
1450 * c-typeck.c (build_array_ref): Likewise.
1451 (build_function_call_vec): Likewise.
1452 (convert_arguments): Likewise.
1453 (build_compound_expr): Likewise.
1454 (c_finish_return): Likewise.
1455 (c_finish_if_stmt): Likewise.
1456 (c_finish_loop): Likewise.
1457 (build_binary_op): Likewise.
1458
393e8e8b
MP
14592014-01-23 Marek Polacek <polacek@redhat.com>
1460
1461 PR c/59846
1462 * c-typeck.c (parser_build_binary_op): Use location instead of
1463 input_location.
1464 (build_binary_op): Pass location to shorten_compare.
1465
f04dda30
MP
14662014-01-23 Marek Polacek <polacek@redhat.com>
1467
1468 PR c/58346
1469 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
1470 an empty aggregate.
1471
789eadcd
MP
14722014-01-23 Marek Polacek <polacek@redhat.com>
1473
1474 PR c/59871
1475 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
1476 of a comma expression.
1477 (emit_side_effect_warnings): Likewise.
1478
40f14e9f
BI
14792014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1480
1481 PR c/59825
1482 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
1483 function to use walk_tree and moved a lot of its functionality to
1484 expand_array_notations.
1485 (expand_array_notations): New function.
1486
74558dd9
BI
14872014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1488
1489 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
1490 attribute an attribute without value.
1491
652fea39
JJ
14922014-01-23 Jakub Jelinek <jakub@redhat.com>
1493
1494 PR middle-end/58809
1495 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
1496 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
1497
f34f1c87
MP
14982014-01-22 Marek Polacek <polacek@redhat.com>
1499
1500 PR c/59891
1501 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
1502 of remove_c_maybe_const_expr on op1 and op2.
1503
241f845a
JJ
15042014-01-15 Jakub Jelinek <jakub@redhat.com>
1505
1506 PR c/58943
1507 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
1508 effects, preevaluate rhs using SAVE_EXPR first.
1509
9a74f20c
BI
15102014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
1511
1512 PR c++/59631
1513 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
1514 statements with if-elseif statements.
1515
96066ce1
MP
15162014-01-06 Marek Polacek <polacek@redhat.com>
1517
1518 PR c/57773
1519 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
1520 defined bit-field types only in ISO C.
1521
23a5b65a
RS
15222014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1523
1524 Update copyright years
1525
f9030485
RS
15262014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1527
1528 * c-array-notation.c: Use the standard form for the copyright notice.
1529
41958c28
BI
15302013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
1531
1532 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
1533 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
1534 field in parser is not empty. If not-empty, call the function
1535 c_parser_finish_omp_declare_simd.
1536 (c_parser_cilk_clause_vectorlength): Modified function to be shared
1537 between SIMD-enabled functions and #pragma simd. Added new parameter.
1538 (c_parser_cilk_all_clauses): Modified the usage of the function
1539 c_parser_cilk_clause_vectorlength as mentioned above.
1540 (c_parser_cilk_simd_fn_vector_attrs): New function.
1541 (c_finish_cilk_simd_fn_tokens): Likewise.
1542 (is_cilkplus_vector_p): Likewise.
1543 (c_parser_omp_clause_name): Added checking for "vectorlength,"
1544 "nomask," and "mask" strings in clause name.
1545 (c_parser_omp_all_clauses): Added 3 new case statements:
1546 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
1547 PRAGMA_CILK_CLAUSE_NOMASK.
1548 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
1549 check for vector attribute and if so call the function
1550 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
1551 called the function c_finish_cilk_simd_fn_tokens.
1552 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
1553 parser field is non-empty. If so, parse them as you would parse
1554 the omp declare simd pragma.
1555 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
1556 Added a check when step is a parameter and flag it as error.
1557 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
1558 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
1559 pragma_omp_clause.
1560
cef0fd0e
TS
15612013-12-17 Thomas Schwinge <thomas@codesourcery.com>
1562
1563 * c-parser.c (c_parser_omp_parallel): Fix description.
1564
12893402
BI
15652013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
1566
1567 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
1568 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1569 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
1570 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
1571
296674db
JM
15722013-12-04 Joseph Myers <joseph@codesourcery.com>
1573
1574 PR c/52023
1575 * c-parser.c (c_parser_alignas_specifier): Use
1576 c_sizeof_or_alignof_type instead of c_alignof.
1577 (c_parser_alignof_expression): Likewise, with min_alignof
1578 parameter depending on alignof spelling used.
1579
edd28054
MP
15802013-12-04 Marek Polacek <polacek@redhat.com>
1581
1582 PR c/54113
1583 * c-decl.c (start_function): Don't warn for missing prototype for
1584 inline functions.
1585
da0fc454
MP
15862013-12-03 Marek Polacek <polacek@redhat.com>
1587
1588 PR c/59351
1589 * c-decl.c (build_compound_literal): Allow compound literals with
1590 empty initial value.
1591
4c2ecab0
JM
15922013-12-02 Joseph Myers <joseph@codesourcery.com>
1593
1594 PR c/58235
1595 * c-typeck.c (build_modify_expr): Diagnose assignment to
1596 expression with array type.
1597
340baef7
JM
15982013-11-29 Joseph Myers <joseph@codesourcery.com>
1599
1600 PR c/42262
1601 * c-typeck.c (process_init_element): Do not treat a string as
1602 initializing a whole array when used with a designator for an
1603 individual element.
1604
6763b9f7
JM
16052013-11-29 Joseph Myers <joseph@codesourcery.com>
1606
1607 PR c/57574
1608 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
1609 an inline function following a static declaration.
1610
e7bd1de1
JJ
16112013-11-28 Jakub Jelinek <jakub@redhat.com>
1612
1613 PR c/59310
1614 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
1615 to p_name before calling c_parser_omp_teams instead of after.
1616 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
1617 argument. Remove unused p_name variable.
1618
0136f8f0
AH
16192013-11-27 Aldy Hernandez <aldyh@redhat.com>
1620 Jakub Jelinek <jakub@redhat.com>
1621
1622 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
1623 external_scope is NULL.
1624
241b71bb
TV
16252013-11-27 Tom de Vries <tom@codesourcery.com>
1626 Marc Glisse <marc.glisse@inria.fr>
1627
1628 PR c++/59032
1629 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
1630
2fb9a547
AM
16312013-11-22 Andrew MacLeod <amacleod@redhat.com>
1632
1633 * c-typeck.c: Add required include files from gimple.h.
1634
8400e75e
DM
16352013-11-22 David Malcolm <dmalcolm@redhat.com>
1636
1637 * c-decl.c (define_label, shadow_tag_warned)
1638 (check_bitfield_type_and_width, grokdeclarator, grokparms,
1639 store_parm_decls_newstyle, store_parm_decls_oldstyle)
1640 (declspecs_add_type): Remove use of in_system_header macro.
1641 * c-parser.c (c_parser_unary_expression): Likewise.
1642 * c-typeck.c (store_init_value, process_init_element)
1643 (c_start_case): Likewise.
1644
1645 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
1646 macro.
1647
1648 * c-parser.c (c_parser_set_source_position_from_token): Remove
1649 reference to in_system_header from comment.
1650
386b1f1f
RS
16512013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1652
1653 * c-decl.c (grokdeclarator): Update comment to refer to
1654 tree_to_[su]hwi rather than tree_low_cst.
1655
ae7e9ddd
RS
16562013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1657
1658 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
1659 tree_to_uhwi throughout.
1660
9439e9a1
RS
16612013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1662
1663 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
1664 throughout.
1665
9541ffee
RS
16662013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1667
1668 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
1669 throughout.
1670
c02065fc
AH
16712013-11-15 Aldy Hernandez <aldyh@redhat.com>
1672
1673 * c-parser.c (c_parser_cilk_simd): New.
1674 (c_parser_cilk_verify_simd): New.
1675 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
1676 (c_parser_omp_for_loop): Add case for NE_EXPR.
1677 Set c_break_label for CILK_SIMD.
1678 (c_parser_cilk_clause_vectorlength): New.
1679 (c_parser_cilk_clause_linear): New.
1680 (c_parser_cilk_clause_name): New.
1681 (c_parser_cilk_all_clauses): New.
1682 * c-typeck.c (build_unary_op): Pass location argument to
1683 readonly_error.
1684 (build_modify_expr): Same.
1685 (build_asm_expr): Same.
1686 (c_finish_bc_stmt): Error on break/continue in loops.
1687
18f429e2
AM
16882013-11-14 Andrew MacLeod <amacleod@redhat.com>
1689
1690 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
1691
d8a2d370
DN
16922013-11-14 Diego Novillo <dnovillo@google.com>
1693
1694 * c-decl.c: Include print-tree.h.
1695 Include stor-layout.h.
1696 Include varasm.h.
1697 Include attribs.h.
1698 Include stringpool.h.
1699 * c-lang.c: Include fold-const.h.
1700 * c-parser.c: Include stringpool.h.
1701 Include attribs.h.
1702 Include stor-layout.h.
1703 Include varasm.h.
1704 Include trans-mem.h.
1705 * c-typeck.c: Include stor-layout.h.
1706 Include trans-mem.h.
1707 Include varasm.h.
1708 Include stmt.h.
1709
38b7bc7f
JM
17102013-11-13 Joseph Myers <joseph@codesourcery.com>
1711
1712 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
1713 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
1714 __auto_type.
1715 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
1716 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
1717 RID_AUTO_TYPE.
1718 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
1719 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
1720 (c_parser_declarator, c_parser_direct_declarator_inner)
1721 (c_parser_parameter_declaration, c_parser_type_name): All callers
1722 changed.
1723 (c_parser_declaration_or_fndef): Handle declarations with type
1724 determined from the initializer.
1725
45b0be94
AM
17262013-11-12 Andrew MacLeod <amacleod@redhat.com>
1727
18f429e2 1728 * c-typeck.c: Include gimplify.h.
45b0be94 1729
582d9b50
JM
17302013-11-12 Joseph Myers <joseph@codesourcery.com>
1731
1732 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
1733 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
1734 comment.
1735 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
1736 or _Thread_local as appropriate in diagnostics.
1737 (build_null_declspecs): Initialize ret->thread_gnu_p.
1738 (declspecs_add_scspec): Handle either __thread or _Thread_local
1739 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
1740 pedantic. Do not disallow _Thread_local extern and _Thread_local
1741 static.
1742
267bac10
JM
17432013-11-07 Joseph Myers <joseph@codesourcery.com>
1744 Andrew MacLeod <amacleod@redhat.com>
1745
1746 * c-aux-info.c (gen_type): Handle atomic qualifier.
1747 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
1748 qualifiers when compating types.
1749 (shadow_tag_warned): Handle atomic_p in declspecs.
1750 (quals_from_declspecs): Likewise.
1751 (start_decl): Use c_type_promotes_to when promoting argument
1752 types.
1753 (grokdeclarator): Handle _Atomic.
1754 (get_parm_info): Diagnose any qualifier on "void" as only
1755 parameter.
1756 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
1757 comparing types. Use c_type_promotes_to when promoting argument
1758 types.
1759 (finish_function): Use c_type_promotes_to when promoting argument
1760 types.
1761 (build_null_declspecs): Handle atomic_p in declspecs.
1762 (declspecs_add_qual): Handle RID_ATOMIC.
1763 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
1764 (c_token_starts_declspecs): Handle RID_ATOMIC.
1765 (c_parser_declspecs): Handle atomic type specifiers and
1766 qualifiers.
1767 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
1768 from types of expressions with atomic type.
1769 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
1770 (c_parser_attribute_any_word): Handle RID_ATOMIC.
1771 (c_parser_initializer, c_parser_initelt, c_parser_initval)
1772 (c_parser_statement_after_labels, c_parser_switch_statement)
1773 (c_parser_for_statement, c_parser_expr_no_commas)
1774 (c_parser_conditional_expression, c_parser_binary_expression)
1775 (c_parser_cast_expression, c_parser_unary_expression)
1776 (c_parser_postfix_expression)
1777 (c_parser_postfix_expression_after_primary, c_parser_expression):
1778 Use convert_lvalue_to_rvalue.
1779 (c_parser_expression_conv, c_parser_expr_list): Document
1780 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
1781 (c_parser_objc_synchronized_statement): Use
1782 convert_lvalue_to_rvalue.
1783 (c_parser_objc_selector): Handle RID_ATOMIC.
1784 (c_parser_objc_receiver, c_parser_array_notation): Use
1785 convert_lvalue_to_rvalue.
1786 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
1787 _Atomic (type-name).
1788 (struct c_declspecs): Add atomic_p field.
1789 (convert_lvalue_to_rvalue): Declare.
1790 * c-typeck.c (c_type_promotes_to): Promote atomic types to
1791 corresponding atomic types.
1792 (qualify_type): Don't add _Atomic qualifiers from second argument.
1793 (comp_target_types): Do not allow _Atomic mismatches.
1794 (type_lists_compatible_p): Do not remove atomic qualifiers when
1795 comparing types.
1796 (really_atomic_lvalue, convert_lvalue_to_rvalue)
1797 (build_atomic_assign): New functions.
1798 (build_unary_op): Use build_atomic_assign for atomic increment and
1799 decrement.
1800 (build_conditional_expr): Do not treat _Atomic void as a qualified
1801 version of void.
1802 (build_modify_expr): Use build_atomic_assign for atomic LHS.
1803 (find_anonymous_field_with_type, convert_to_anonymous_field)
1804 (convert_for_assignment): Do not remove atomic qualifiers when
1805 comparing types.
1806 (digest_init): Do not accept initialization of arrays of atomic
1807 elements by string constants.
1808 (build_asm_expr): Use convert_lvalue_to_rvalue.
1809 (build_binary_op): Do not treat _Atomic void as a qualified
1810 version of void.
1811
0c249d4b
DD
18122013-11-06 DJ Delorie <dj@redhat.com>
1813
1814 * c-decl.c (locate_old_decl): If a previous conflicting decl is
1815 both explicit and builtin, print the location of the explicit one.
1816
6d7f7e0a
TB
18172013-11-05 Tobias Burnus <burnus@net-b.de>
1818
1819 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
1820 c_parser_omp_distribute, c_parser_omp_teams,
1821 c_parser_omp_target, c_parser_omp_declare): Handle
1822 -fopenmp-simd.
1823
b906f4ca
MP
18242013-11-03 Marek Polacek <polacek@redhat.com>
1825
1826 * c-decl.c (grokdeclarator): Add VLA instrumentation.
1827
ee1d5a02
JJ
18282013-11-01 Jakub Jelinek <jakub@redhat.com>
1829
1830 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
1831 check_dup_generic at the end, unless remove is true.
1832 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
1833 remove = true;.
1834 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
1835
5a9785fb
JJ
18362013-10-31 Jakub Jelinek <jakub@redhat.com>
1837
1838 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
1839 with decl that is not pointer nor array.
1840
939b37da
BI
18412013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1842
1843 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
1844 a spawning function is found.
1845 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
1846 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
1847 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1848 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
1849 case.
1850 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
1851 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
1852 expr.
1853 (c_finish_return): Added a check to reject _Cilk_spawn in return
1854 expression.
1855 (build_cilk_spawn): New function.
1856 (build_cilk_sync): Likewise.
1857 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
1858
d4af74d4
TB
18592013-10-27 Tobias Burnus <burnus@net-b.de>
1860
1861 PR other/33426
1862 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
1863 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
1864 (c_parser_statement_after_labels): Update calls.
1865
d73749df 18662013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
1867
1868 PR other/33426
1869 * c-parser.c (c_parser_pragma, c_parser_for_statement):
1870 Handle PRAGMA_IVDEP.
1871 (c_parser_statement_after_labels): Update call.
1872
f28aa681
MP
18732013-10-24 Marek Polacek <polacek@redhat.com>
1874
1875 * c-parser.c (c_parser_struct_declaration): Add a comment.
1876 (c_parser_declarator): Don't allow _Alignas here.
1877
0645c1a2
AM
18782013-10-17 Andrew MacLeod <amacleod@redhat.com>
1879
1880 * c-parser.c: Include omp-low.h.
1881 * c-typeck.c: Likewise.
1882
568a31f2
MP
18832013-10-17 Marek Polacek <polacek@redhat.com>
1884
1885 PR c/58267
1886 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
1887 Document syntax of the array-declarator.
1888 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
1889 are not permitted.
1890 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
1891 (c_parser_struct_declaration): Likewise.
1892 (c_parser_declarator): Likewise.
1893 (c_parser_direct_declarator_inner): Likewise.
1894 (c_parser_parameter_declaration): Likewise.
1895 (c_parser_type_name): Likewise.
1896
acf0174b
JJ
18972013-10-11 Jakub Jelinek <jakub@redhat.com>
1898
1899 * c-lang.h (current_omp_declare_target_attribute): New extern
1900 decl.
1901 * c-parser.c: Include c-lang.h.
1902 (struct c_parser): Change tokens to c_token *.
1903 Add tokens_buf field. Change tokens_avail type to unsigned int.
1904 (c_parser_consume_token): If parser->tokens isn't
1905 &parser->tokens_buf[0], increment parser->tokens.
1906 (c_parser_consume_pragma): Likewise.
1907 (enum pragma_context): Add pragma_struct and pragma_param.
1908 (c_parser_external_declaration): Adjust
1909 c_parser_declaration_or_fndef caller.
1910 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
1911 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
1912 Adjust recursive call.
1913 (c_parser_struct_or_union_specifier): Use pragma_struct instead
1914 of pragma_external.
1915 (c_parser_parameter_declaration): Use pragma_param instead of
1916 pragma_external.
1917 (c_parser_compound_statement_nostart, c_parser_label,
1918 c_parser_for_statement): Adjust
1919 c_parser_declaration_or_fndef callers.
1920 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
1921 it through to c_parser_conditional_expression.
1922 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
1923 pass it through to c_parser_binary_expression. Adjust recursive
1924 call.
1925 (c_parser_binary_expression): Remove prec argument, add
1926 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
1927 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
1928 binop matches it, use build2 instead of parser_build_binary_op.
1929 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
1930 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
1931 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
1932 Handle pragma_struct and pragma_param the same as pragma_external.
1933 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
1934 (c_parser_omp_variable_list): Parse array sections for
1935 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
1936 (c_parser_omp_clause_collapse): Fully fold collapse expression.
1937 (c_parser_omp_clause_reduction): Handle user defined reductions.
1938 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
1939 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
1940 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
1941 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
1942 c_parser_omp_clause_depend, c_parser_omp_clause_map,
1943 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
1944 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
1945 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
1946 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
1947 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
1948 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
1949 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
1950 (c_parser_omp_for_loop): Add CODE argument, pass it through
1951 to c_finish_omp_for. Change last argument to cclauses,
1952 and adjust uses to grab parallel clauses from the array of all
1953 the split clauses. Adjust c_parser_binary_expression,
1954 c_parser_declaration_or_fndef and c_finish_omp_for callers.
1955 (omp_split_clauses): New function.
1956 (c_parser_omp_simd): New function.
1957 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
1958 Allow the function to be called also when parsing combined constructs,
1959 and call c_parser_omp_simd when parsing for simd.
1960 (c_parser_omp_sections_scope): If section-sequence doesn't start with
1961 #pragma omp section, require exactly one structured-block instead of
1962 sequence of statements.
1963 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
1964 Allow the function to be called also when parsing combined constructs.
1965 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
1966 Allow the function to be called also when parsing combined
1967 constructs.
1968 (c_parser_omp_taskgroup, c_parser_omp_cancel,
1969 c_parser_omp_cancellation_point, c_parser_omp_distribute,
1970 c_parser_omp_teams, c_parser_omp_target_data,
1971 c_parser_omp_target_update, c_parser_omp_target,
1972 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
1973 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
1974 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
1975 (c_parser_omp_construct): Add p_name and mask vars. Handle
1976 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
1977 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
1978 and c_parser_omp_sections callers.
1979 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
1980 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1981 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
1982 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
1983 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
1984 OMP_CLAUSE_DEPEND.
1985 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
1986 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
1987 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
1988 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
1989 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
1990 * c-typeck.c: Include tree-inline.h.
1991 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
1992 handle_omp_array_sections_1, handle_omp_array_sections,
1993 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
1994 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
1995 user defined reductions.
1996 (c_tree_equal): New function.
1997 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
1998 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
1999 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
2000 c_check_omp_declare_reduction_r): New prototypes.
2001 * c-decl.c (current_omp_declare_target_attribute): New variable.
2002 (c_decl_attributes): New function.
2003 (start_decl, start_function): Use it instead of decl_attributes.
2004 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
2005 c_omp_reduction_decl, c_omp_reduction_lookup,
2006 c_check_omp_declare_reduction_r): New functions.
2007
0a6c2227
TT
20082013-09-25 Tom Tromey <tromey@redhat.com>
2009
2010 * Make-lang.in (c/gccspec.o): Remove.
2011 (CFLAGS-c/gccspec.o): New variable.
2012 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
2013 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
2014 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
2015
f3bc55f0
TT
20162013-09-25 Tom Tromey <tromey@redhat.com>
2017
2018 * Make-lang.in (c/gccspec.o): Don't use subshell.
2019
a24d975c
MP
20202013-09-18 Marek Polacek <polacek@redhat.com>
2021
2022 PR sanitize/58443
2023 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
2024 Remove unnecessary check.
2025
ce6923c5
MP
20262013-09-18 Marek Polacek <polacek@redhat.com>
2027
2028 PR sanitizer/58411
2029 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
2030 no_sanitize_undefined attribute.
2031
a1e51df9
KT
20322013-09-13 Kai Tietz <ktietz@redhat.com>
2033
2034 PR target/57848
2035 * c-decl.c (c_builtin_function_ext_scope): Remove
2036 wrong assumption that it is never called on prexisting
2037 symbol.
2038
0af94e6f
JR
20392013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
2040
2041 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
2042
20059c8b
GDR
20432013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2044
2045 * c-objc-common.c (c_tree_printer): Tidy.
2046
de5a5fa1
MP
20472013-08-30 Marek Polacek <polacek@redhat.com>
2048
2049 * c-typeck.c (build_binary_op): Add division by zero and shift
2050 instrumentation.
2051
2531a1d9 20522013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 2053 Joseph Myers <joseph@codesourcery.com>
2531a1d9 2054
6e2bcc98 2055 PR c/35649
2531a1d9
JR
2056 * c-typeck.c (c_common_type): Prefer double_type_node over
2057 other REAL_TYPE types with the same precision.
2058 (convert_arguments): Likewise.
2059
025311c4
GDR
20602013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
2061
2062 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
2063 (c_initialize_diagnostics): Call a destructor for the early printer.
2064
da6ca2b5
GDR
20652013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2066
2067 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
2068 printer initialization.
2069
318cda85 20702013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 2071
318cda85
BI
2072 PR c/57490
2073 * c-array-notation.c (fix_conditional_array_notations_1): Added a
2074 check for truth values.
2075 (expand_array_notation_exprs): Added truth values case. Removed an
2076 unwanted else. Added for-loop to walk through subtrees in default
2077 case.
2078
b066401f
GDR
20792013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2080
2081 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
2082
fb48aadc
JM
20832013-07-23 Joseph Myers <joseph@codesourcery.com>
2084
2085 * c-parser.c (struct c_generic_association): Fix typo.
2086
433cc7b0
TT
20872013-07-23 Tom Tromey <tromey@redhat.com>
2088 Joseph Myers <joseph@codesourcery.com>
2089
2090 * c-parser.c (struct c_generic_association): New.
2091 (c_generic_association_d): New typedef.
2092 (c_parser_generic_selection): New function.
2093 (c_parser_postfix_expression): Handle RID_GENERIC.
2094
26d40c3d
JM
20952013-07-13 Jason Merrill <jason@redhat.com>
2096
2097 PR c++/57793
2098 * c-decl.c (finish_struct): Check for too-large class.
2099
ecdbd01a 21002013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
2101
2102 PR c/57821
2103 * c-typeck.c (set_init_index): When folding, check for index overflow.
2104
1141ed3f
BI
21052013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2106
2107 * c-parser.c (c_parser_array_notation): Removed rejection of array
2108 notations in an array of function pointers.
2109
713b46fa
BI
21102013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
2111
2112 * c-array-notation.c (make_triplet_val_inv): New function.
2113 (create_cmp_incr): Likewise.
2114 (create_array_refs): Likewise.
2115 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
2116 Also modularized common parts between functions and called the function.
2117 (build_array_notation_expr): Likewise.
2118 (fix_conditional_array_notations_1): Likewise.
2119 (fix_array_notation_expr): Likewise.
2120 (fix_array_notation_call_expr): Likewise.
2121
92f20202
MP
21222013-06-18 Marek Polacek <polacek@redhat.com>
2123
2124 PR c/57630
2125 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
2126
73a23b06
BI
21272013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
2128
2129 * c-array-notation.c (build_array_notation_expr): Reject array notation
2130 mismatch between LHS and RHS even inside a call_expr. Also, removed
2131 a couple while statements that were dead code.
2132
00b8517d
BI
21332013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
2134
2135 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
2136 excessive precision expressions in function parameters. Also removed
2137 couple unwanted while statements.
2138
1509bdda
BI
21392013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2140
2141 * c-array-notation.c (expand_array_notation_exprs): Added
2142 ARRAY_NOTATION_REF case.
2143
d60f1706
BI
21442013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2145
2146 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
2147 function to c-family/array-notation-common.c.
2148 (is_cilkplus_reduce_builtin): Likewise.
2149 (find_rank): Likewise.
2150 (extract_array_notation_exprs): Likewise.
2151 (replace_array_notations): Likewise.
2152 (find_inv_trees): Likewise.
2153 (replace_inv_trees): Likewise.
2154 (contains_array_notation_expr): Likewise.
2155 (find_correct_array_notation_type): Likewise.
2156 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
2157 (struct inv_list): Moved this to c-family/array-notation-common.c.
2158 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
2159
6d6efbb3
BI
21602013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
2161
2162 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
2163 reduction functions outside the for-loop. Added a check if the fundecl
2164 is non-NULL. Finally, removed an unwanted if-statement, and made the
2165 body unconditional.
2166
25c22937
BI
21672013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2168
2169 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
2170 condition of the if-statement matches the rank of else-block and then-
2171 block when array notations are used.
2172 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
2173 expression after the entire function body is parsed.
2174 (c_parser_expr_no_commas): Delayed creating array notation expressions
2175 to the end of function parsing.
2176 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
2177 whole if-statement instead of just the condition.
2178 (expand_array_notation_exprs): Added MODIFY_EXPR case.
2179
edd25645
BI
21802013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2181
2182 PR c/57474
2183 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
2184 array to NULL_TREE if they are unused. Also added a check for the
2185 field to be NULL before its fields are used in future.
2186
065ce7f1
RO
21872013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2188
2189 PR bootstrap/57450
2190 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
2191 (build_array_notation_expr): Likewise.
2192
36536d79
BI
21932013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2194
2195 * c-typeck.c (build_array_ref): Added a check to see if array's
2196 index is greater than one. If true, then emit an error.
2197 (build_function_call_vec): Exclude error reporting and checking
2198 for builtin array-notation functions.
2199 (convert_arguments): Likewise.
2200 (c_finish_return): Added a check for array notations as a return
2201 expression. If true, then emit an error.
2202 (c_finish_loop): Added a check for array notations in a loop
2203 condition. If true then emit an error.
2204 (lvalue_p): Added a ARRAY_NOTATION_REF case.
2205 (build_binary_op): Added a check for array notation expr inside
2206 op1 and op0. If present, we call another function to find correct
2207 type.
2208 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
2209 * c-parser.c (c_parser_compound_statement): Check if array
2210 notation code is used in tree, if so, then transform them into
2211 appropriate C code.
2212 (c_parser_expr_no_commas): Check if array notation is used in LHS
2213 or RHS, if so, then build array notation expression instead of
2214 regular modify.
2215 (c_parser_postfix_expression_after_primary): Added a check for
2216 colon(s) after square braces, if so then handle it like an array
2217 notation. Also, break up array notations in unary op if found.
2218 (c_parser_direct_declarator_inner): Added a check for array
2219 notation.
2220 (c_parser_compound_statement): Added a check for array notation in
2221 a stmt. If one is present, then expand array notation expr.
2222 (c_parser_if_statement): Likewise.
2223 (c_parser_switch_statement): Added a check for array notations in
2224 a switch statement's condition. If true, then output an error.
2225 (c_parser_while_statement): Similarly, but for a while.
2226 (c_parser_do_statement): Similarly, but for a do-while.
2227 (c_parser_for_statement): Similarly, but for a for-loop.
2228 (c_parser_unary_expression): Check if array notation is used in a
2229 pre-increment or pre-decrement expression. If true, then expand
2230 them.
2231 (c_parser_array_notation): New function.
2232 * c-array-notation.c: New file.
2233 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
2234
cd192ccc
MS
22352013-05-23 Mike Stump <mikestump@comcast.net>
2236
2237 * c-typeck.c (convert_for_assignment): Handle references to memory
2238 spaces better.
2239
427b248d
JM
22402013-05-16 Jason Merrill <jason@redhat.com>
2241
2242 * Make-lang.in (cc1$(exeext)): Use link mutex.
2243
44d90fe1
PC
22442013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
2245
2246 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
2247 to simply use OPT_Wpointer_arith.
2248 (build_unary_op): Likewise.
2249
4e7d7b3d
JJ
22502013-04-03 Jakub Jelinek <jakub@redhat.com>
2251
2252 PR c/19449
2253 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
2254 argument. If set, or it temporarily for parsing of the first
2255 argument into force_folding_builtin_constant_p.
2256 (c_parser_postfix_expression): Adjust callers.
2257
839b422f
RB
22582013-03-21 Richard Biener <rguenther@suse.de>
2259
2260 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
2261 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
2262
2ee028f1
MP
22632013-02-12 Marek Polacek <polacek@redhat.com>
2264
2265 PR c/44938
2266 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
2267 origtypes to NULL.
2268
8824edff
JJ
22692013-01-24 Jakub Jelinek <jakub@redhat.com>
2270
2271 PR c/56078
2272 * c-typeck.c (set_nonincremental_init_from_string): If
2273 constructor_max_index is NULL, treat it as if tree_int_cst_lt
2274 returned false.
2275 (process_init_element): Likewise.
2276
eadd3d0d
JJ
22772012-12-20 Jakub Jelinek <jakub@redhat.com>
2278
2279 PR c++/55619
2280 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
2281 argument, don't call default_function_array_conversion
2282 nor c_fully_fold here.
2283 (c_parser_asm_statement): Adjust callers.
2284 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
2285 and outputs here, and call default_function_array_conversion
2286 on inputs that don't need to be addressable.
2287
f8a93a2e
JJ
22882012-12-18 Jakub Jelinek <jakub@redhat.com>
2289
2290 PR c/39464
2291 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
2292 warning require that both c_common_unsigned_type as well as
2293 c_common_signed_type is the same for both mvl and mvr types.
2294
9771b263
DN
22952012-11-16 Diego Novillo <dnovillo@google.com>
2296
2297 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
2298
2299 * c-common.c: Use new vec API in vec.h.
2300 * c-common.h: Likewise.
2301 * c-gimplify.c: Likewise.
2302 * c-pragma.c: Likewise.
2303 * c-pretty-print.c: Likewise.
2304 * c-pretty-print.h: Likewise.
2305 * c-semantics.c: Likewise.
2306 * c-decl.c: Likewise.
2307 * c-parser.c: Likewise.
2308 * c-tree.h: Likewise.
2309 * c-typeck.c: Likewise.
2310
880661a4
JW
23112012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
2312
2313 PR c++/54930
2314 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
2315
077d1abe
MLI
23162012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2317
2318 PR c/53066
2319 * c-decl.c (warn_if_shadowing): Do not warn if a variable
2320 shadows a function, unless the variable is a function or a
2321 pointer-to-function.
2322
3a785c97
JJ
23232012-10-12 Jakub Jelinek <jakub@redhat.com>
2324
2325 PR c/54381
2326 * c-parser.c (struct c_tree_loc_pair): Removed.
2327 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
2328 add location_t * and tree * arguments, fill in array of 3
2329 sizeof_arg trees and corresponding locs.
2330 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
2331 c_parser_expr_list callers.
2332 (c_parser_postfix_expression_after_primary): Likewise. Pass
2333 array of 3 sizeof_arg trees and locs (corresponding to first
2334 3 arguments) to sizeof_pointer_memaccess_warning.
2335
703c8606
LC
23362012-10-09 Lawrence Crowl <crowl@google.com>
2337
2338 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
2339 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
2340 hash table.
2341
5d9de0d0
PC
23422012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
2343
2344 PR c++/54194
2345 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
2346 call.
2347
a212e43f
MG
23482012-10-09 Marc Glisse <marc.glisse@inria.fr>
2349
2350 PR c++/54427
2351 * c-typeck.c: Include c-common.h.
2352 (enum stv_conv): Moved to c-common.h.
2353 (scalar_to_vector): Moved to c-common.c.
2354 (build_binary_op): Adapt to scalar_to_vector's new prototype.
2355 * Make-lang.in: c-typeck.c depends on c-common.h.
2356
3b78de56
AC
23572012-10-04 Arnaud Charlet <charlet@adacore.com>
2358
2359 * c-decl.c (c_write_global_declarations): Fix handling of
2360 -fdump-ada-spec*.
2361
78c60e3d
SS
23622012-09-30 Sharad Singhai <singhai@google.com>
2363
2364 * c-decl.c (c_write_global_declarations): Use a different method
2365 to determine if the dump has ben initialized.
2366
9f33203d
JM
23672012-09-14 Joseph Myers <joseph@codesourcery.com>
2368
2369 PR c/54552
2370 * c-typeck.c (c_cast_expr): When casting to a type requiring
2371 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
2372 c_fully_fold first.
2373
a27d595d
JM
23742012-09-14 Joseph Myers <joseph@codesourcery.com>
2375
2376 PR c/54103
2377 * c-typeck.c (build_unary_op): Pass original argument of
2378 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
2379 any C_MAYBE_CONST_EXPR, if it has integer operands.
2380 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
2381 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
2382 to c_objc_common_truthvalue_conversion, then remove any
2383 C_MAYBE_CONST_EXPR, if they have integer operands. Use
2384 c_objc_common_truthvalue_conversion not
2385 c_common_truthvalue_conversion.
2386 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
2387 call note_integer_operands for arguments with integer operands
2388 that are not integer constants.
2389
9feb29df
JJ
23902012-09-13 Jakub Jelinek <jakub@redhat.com>
2391
2392 PR c/54559
2393 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
2394 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
2395
d409320c
JJ
23962012-08-31 Jakub Jelinek <jakub@redhat.com>
2397
2398 PR c/54428
2399 * c-convert.c (convert): Don't call fold_convert_loc if
2400 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
2401 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
2402 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
2403
6265d07c
JJ
24042012-08-24 Jakub Jelinek <jakub@redhat.com>
2405
2406 PR c/54355
2407 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
2408 for nested and empty_ok arguments in the call to
2409 c_parser_declaration_or_fndef.
2410
1a4049e7
JJ
24112012-08-17 Jakub Jelinek <jakub@redhat.com>
2412
2413 * c-tree.h (c_last_sizeof_arg): Declare.
2414 * c-parser.c (struct c_tree_loc_pair): New type.
2415 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
2416 non-NULL.
2417 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
2418 (c_parser_postfix_expression_after_primary): Likewise. Call
2419 sizeof_pointer_memaccess_warning if needed.
2420 (sizeof_ptr_memacc_comptypes): New function.
2421 * c-typeck.c (c_last_sizeof_arg): New global variable.
2422 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
2423
0229aee9
UB
24242012-07-24 Uros Bizjak <ubizjak@gmail.com>
2425
2426 * c-lang.h (lang_decl): Add variable_size GTY option.
2427
7ee2468b
SB
24282012-07-16 Steven Bosscher <steven@gcc.gnu.org>
2429
2430 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
2431 * Make-lang.in: Fix dependencies.
2432
d4a10d0a
SB
24332012-06-29 Steven Bosscher <steven@gcc.gnu.org>
2434
2435 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
2436 and add language Makefile hooks.
2437 * config-lang.in: New file.
2438 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
2439 add the required "normal" config-lang.in rules.
2440 * c-lang.h: Moved from gcc/ to here.
2441 * c-tree.h: Likewise.
2442 * c-objc-common.c: Likewise.
2443 * c-objc-common.h: Likewise.
2444 * c-typeck.c: Likewise.
2445 * c-convert.c: Likewise.
2446 * c-lang.c: Likewise.
2447 * c-aux-info.c: Likewise.
2448 * c-errors.c: Likewise.
2449 * gccspec.c: Likewise.
2450 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
2451 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
2452\f
5624e564 2453Copyright (C) 2012-2015 Free Software Foundation, Inc.
d4a10d0a
SB
2454
2455Copying and distribution of this file, with or without modification,
2456are permitted in any medium without royalty provided the copyright
2457notice and this notice are preserved.